diff options
Diffstat (limited to '')
47 files changed, 93 insertions, 180 deletions
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h index ad8ae9d146..9c32447606 100644 --- a/src/lib/libssl/src/apps/apps.h +++ b/src/lib/libssl/src/apps/apps.h | |||
| @@ -137,7 +137,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read, | |||
| 137 | * (see e_os.h). The string is | 137 | * (see e_os.h). The string is |
| 138 | * destroyed! */ | 138 | * destroyed! */ |
| 139 | 139 | ||
| 140 | #define MAIN(a,v) PROG(a,v) | ||
| 141 | extern CONF *config; | 140 | extern CONF *config; |
| 142 | extern char *default_config_file; | 141 | extern char *default_config_file; |
| 143 | extern BIO *bio_err; | 142 | extern BIO *bio_err; |
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c index f11f1676f0..c52748c2aa 100644 --- a/src/lib/libssl/src/apps/asn1pars.c +++ b/src/lib/libssl/src/apps/asn1pars.c | |||
| @@ -77,15 +77,13 @@ | |||
| 77 | * -oid file - extra oid description file | 77 | * -oid file - extra oid description file |
| 78 | */ | 78 | */ |
| 79 | 79 | ||
| 80 | #undef PROG | ||
| 81 | #define PROG asn1parse_main | ||
| 82 | 80 | ||
| 83 | int MAIN(int, char **); | 81 | int asn1parse_main(int, char **); |
| 84 | 82 | ||
| 85 | static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf); | 83 | static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf); |
| 86 | 84 | ||
| 87 | int | 85 | int |
| 88 | MAIN(int argc, char **argv) | 86 | asn1parse_main(int argc, char **argv) |
| 89 | { | 87 | { |
| 90 | int i, badops = 0, offset = 0, ret = 1, j; | 88 | int i, badops = 0, offset = 0, ret = 1, j; |
| 91 | unsigned int length = 0; | 89 | unsigned int length = 0; |
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index 6396249673..22eade7363 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c | |||
| @@ -89,8 +89,6 @@ | |||
| 89 | #define R_OK 4 | 89 | #define R_OK 4 |
| 90 | #endif | 90 | #endif |
| 91 | 91 | ||
| 92 | #undef PROG | ||
| 93 | #define PROG ca_main | ||
| 94 | 92 | ||
| 95 | #define BASE_SECTION "ca" | 93 | #define BASE_SECTION "ca" |
| 96 | #define CONFIG_FILE "openssl.cnf" | 94 | #define CONFIG_FILE "openssl.cnf" |
| @@ -235,10 +233,10 @@ certify(X509 ** xret, char *infile, EVP_PKEY * pkey, X509 * x509, | |||
| 235 | static int msie_hack = 0; | 233 | static int msie_hack = 0; |
| 236 | 234 | ||
| 237 | 235 | ||
| 238 | int MAIN(int, char **); | 236 | int ca_main(int, char **); |
| 239 | 237 | ||
| 240 | int | 238 | int |
| 241 | MAIN(int argc, char **argv) | 239 | ca_main(int argc, char **argv) |
| 242 | { | 240 | { |
| 243 | ENGINE *e = NULL; | 241 | ENGINE *e = NULL; |
| 244 | char *key = NULL, *passargin = NULL; | 242 | char *key = NULL, *passargin = NULL; |
diff --git a/src/lib/libssl/src/apps/ciphers.c b/src/lib/libssl/src/apps/ciphers.c index 8e6427582c..d7ee87aa26 100644 --- a/src/lib/libssl/src/apps/ciphers.c +++ b/src/lib/libssl/src/apps/ciphers.c | |||
| @@ -66,8 +66,6 @@ | |||
| 66 | #include <openssl/err.h> | 66 | #include <openssl/err.h> |
| 67 | #include <openssl/ssl.h> | 67 | #include <openssl/ssl.h> |
| 68 | 68 | ||
| 69 | #undef PROG | ||
| 70 | #define PROG ciphers_main | ||
| 71 | 69 | ||
| 72 | static const char *ciphers_usage[] = { | 70 | static const char *ciphers_usage[] = { |
| 73 | "usage: ciphers args\n", | 71 | "usage: ciphers args\n", |
| @@ -79,10 +77,10 @@ static const char *ciphers_usage[] = { | |||
| 79 | NULL | 77 | NULL |
| 80 | }; | 78 | }; |
| 81 | 79 | ||
| 82 | int MAIN(int, char **); | 80 | int ciphers_main(int, char **); |
| 83 | 81 | ||
| 84 | int | 82 | int |
| 85 | MAIN(int argc, char **argv) | 83 | ciphers_main(int argc, char **argv) |
| 86 | { | 84 | { |
| 87 | int ret = 1, i; | 85 | int ret = 1, i; |
| 88 | int verbose = 0, Verbose = 0; | 86 | int verbose = 0, Verbose = 0; |
diff --git a/src/lib/libssl/src/apps/cms.c b/src/lib/libssl/src/apps/cms.c index 7948e4c09f..b1ed9c392e 100644 --- a/src/lib/libssl/src/apps/cms.c +++ b/src/lib/libssl/src/apps/cms.c | |||
| @@ -66,8 +66,6 @@ | |||
| 66 | #include <openssl/x509v3.h> | 66 | #include <openssl/x509v3.h> |
| 67 | #include <openssl/cms.h> | 67 | #include <openssl/cms.h> |
| 68 | 68 | ||
| 69 | #undef PROG | ||
| 70 | #define PROG cms_main | ||
| 71 | static int save_certs(char *signerfile, STACK_OF(X509) * signers); | 69 | static int save_certs(char *signerfile, STACK_OF(X509) * signers); |
| 72 | static int cms_cb(int ok, X509_STORE_CTX * ctx); | 70 | static int cms_cb(int ok, X509_STORE_CTX * ctx); |
| 73 | static void receipt_request_print(BIO * out, CMS_ContentInfo * cms); | 71 | static void receipt_request_print(BIO * out, CMS_ContentInfo * cms); |
| @@ -98,10 +96,10 @@ make_receipt_request(STACK_OF(OPENSSL_STRING) * rr_to, | |||
| 98 | 96 | ||
| 99 | int verify_err = 0; | 97 | int verify_err = 0; |
| 100 | 98 | ||
| 101 | int MAIN(int, char **); | 99 | int cms_main(int, char **); |
| 102 | 100 | ||
| 103 | int | 101 | int |
| 104 | MAIN(int argc, char **argv) | 102 | cms_main(int argc, char **argv) |
| 105 | { | 103 | { |
| 106 | ENGINE *e = NULL; | 104 | ENGINE *e = NULL; |
| 107 | int operation = 0; | 105 | int operation = 0; |
diff --git a/src/lib/libssl/src/apps/crl.c b/src/lib/libssl/src/apps/crl.c index 914426df45..07fb1fbcdc 100644 --- a/src/lib/libssl/src/apps/crl.c +++ b/src/lib/libssl/src/apps/crl.c | |||
| @@ -66,8 +66,6 @@ | |||
| 66 | #include <openssl/x509v3.h> | 66 | #include <openssl/x509v3.h> |
| 67 | #include <openssl/pem.h> | 67 | #include <openssl/pem.h> |
| 68 | 68 | ||
| 69 | #undef PROG | ||
| 70 | #define PROG crl_main | ||
| 71 | 69 | ||
| 72 | #undef POSTFIX | 70 | #undef POSTFIX |
| 73 | #define POSTFIX ".rvk" | 71 | #define POSTFIX ".rvk" |
| @@ -99,10 +97,10 @@ static const char *crl_usage[] = { | |||
| 99 | static X509_CRL *load_crl(char *file, int format); | 97 | static X509_CRL *load_crl(char *file, int format); |
| 100 | static BIO *bio_out = NULL; | 98 | static BIO *bio_out = NULL; |
| 101 | 99 | ||
| 102 | int MAIN(int, char **); | 100 | int crl_main(int, char **); |
| 103 | 101 | ||
| 104 | int | 102 | int |
| 105 | MAIN(int argc, char **argv) | 103 | crl_main(int argc, char **argv) |
| 106 | { | 104 | { |
| 107 | unsigned long nmflag = 0; | 105 | unsigned long nmflag = 0; |
| 108 | X509_CRL *x = NULL; | 106 | X509_CRL *x = NULL; |
diff --git a/src/lib/libssl/src/apps/crl2p7.c b/src/lib/libssl/src/apps/crl2p7.c index b98260d172..b994c0ce3a 100644 --- a/src/lib/libssl/src/apps/crl2p7.c +++ b/src/lib/libssl/src/apps/crl2p7.c | |||
| @@ -72,8 +72,6 @@ | |||
| 72 | #include <openssl/objects.h> | 72 | #include <openssl/objects.h> |
| 73 | 73 | ||
| 74 | static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile); | 74 | static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile); |
| 75 | #undef PROG | ||
| 76 | #define PROG crl2pkcs7_main | ||
| 77 | 75 | ||
| 78 | /* -inform arg - input format - default PEM (DER or PEM) | 76 | /* -inform arg - input format - default PEM (DER or PEM) |
| 79 | * -outform arg - output format - default PEM | 77 | * -outform arg - output format - default PEM |
| @@ -81,10 +79,10 @@ static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile); | |||
| 81 | * -out arg - output file - default stdout | 79 | * -out arg - output file - default stdout |
| 82 | */ | 80 | */ |
| 83 | 81 | ||
| 84 | int MAIN(int, char **); | 82 | int crl2pkcs7_main(int, char **); |
| 85 | 83 | ||
| 86 | int | 84 | int |
| 87 | MAIN(int argc, char **argv) | 85 | crl2pkcs7_main(int argc, char **argv) |
| 88 | { | 86 | { |
| 89 | int i, badops = 0; | 87 | int i, badops = 0; |
| 90 | BIO *in = NULL, *out = NULL; | 88 | BIO *in = NULL, *out = NULL; |
diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c index a68e3ce562..09105399ff 100644 --- a/src/lib/libssl/src/apps/dgst.c +++ b/src/lib/libssl/src/apps/dgst.c | |||
| @@ -71,8 +71,6 @@ | |||
| 71 | #undef BUFSIZE | 71 | #undef BUFSIZE |
| 72 | #define BUFSIZE 1024*8 | 72 | #define BUFSIZE 1024*8 |
| 73 | 73 | ||
| 74 | #undef PROG | ||
| 75 | #define PROG dgst_main | ||
| 76 | 74 | ||
| 77 | int | 75 | int |
| 78 | do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout, | 76 | do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout, |
| @@ -100,10 +98,10 @@ list_md_fn(const EVP_MD * m, const char *from, const char *to, void *arg) | |||
| 100 | mname, mname); | 98 | mname, mname); |
| 101 | } | 99 | } |
| 102 | 100 | ||
| 103 | int MAIN(int, char **); | 101 | int dgst_main(int, char **); |
| 104 | 102 | ||
| 105 | int | 103 | int |
| 106 | MAIN(int argc, char **argv) | 104 | dgst_main(int argc, char **argv) |
| 107 | { | 105 | { |
| 108 | ENGINE *e = NULL; | 106 | ENGINE *e = NULL; |
| 109 | unsigned char *buf = NULL; | 107 | unsigned char *buf = NULL; |
diff --git a/src/lib/libssl/src/apps/dh.c b/src/lib/libssl/src/apps/dh.c index 1fc536d909..af326a7340 100644 --- a/src/lib/libssl/src/apps/dh.c +++ b/src/lib/libssl/src/apps/dh.c | |||
| @@ -71,8 +71,6 @@ | |||
| 71 | #include <openssl/x509.h> | 71 | #include <openssl/x509.h> |
| 72 | #include <openssl/pem.h> | 72 | #include <openssl/pem.h> |
| 73 | 73 | ||
| 74 | #undef PROG | ||
| 75 | #define PROG dh_main | ||
| 76 | 74 | ||
| 77 | /* -inform arg - input format - default PEM (DER or PEM) | 75 | /* -inform arg - input format - default PEM (DER or PEM) |
| 78 | * -outform arg - output format - default PEM | 76 | * -outform arg - output format - default PEM |
| @@ -84,10 +82,10 @@ | |||
| 84 | * -C | 82 | * -C |
| 85 | */ | 83 | */ |
| 86 | 84 | ||
| 87 | int MAIN(int, char **); | 85 | int dh_main(int, char **); |
| 88 | 86 | ||
| 89 | int | 87 | int |
| 90 | MAIN(int argc, char **argv) | 88 | dh_main(int argc, char **argv) |
| 91 | { | 89 | { |
| 92 | DH *dh = NULL; | 90 | DH *dh = NULL; |
| 93 | int i, badops = 0, text = 0; | 91 | int i, badops = 0, text = 0; |
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index 8585f8f419..b7a8196860 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
| @@ -127,8 +127,6 @@ | |||
| 127 | #include <openssl/dsa.h> | 127 | #include <openssl/dsa.h> |
| 128 | #endif | 128 | #endif |
| 129 | 129 | ||
| 130 | #undef PROG | ||
| 131 | #define PROG dhparam_main | ||
| 132 | 130 | ||
| 133 | #define DEFBITS 512 | 131 | #define DEFBITS 512 |
| 134 | 132 | ||
| @@ -145,10 +143,10 @@ | |||
| 145 | 143 | ||
| 146 | static int dh_cb(int p, int n, BN_GENCB * cb); | 144 | static int dh_cb(int p, int n, BN_GENCB * cb); |
| 147 | 145 | ||
| 148 | int MAIN(int, char **); | 146 | int dhparam_main(int, char **); |
| 149 | 147 | ||
| 150 | int | 148 | int |
| 151 | MAIN(int argc, char **argv) | 149 | dhparam_main(int argc, char **argv) |
| 152 | { | 150 | { |
| 153 | DH *dh = NULL; | 151 | DH *dh = NULL; |
| 154 | int i, badops = 0, text = 0; | 152 | int i, badops = 0, text = 0; |
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c index a4132de0ea..6df8c25596 100644 --- a/src/lib/libssl/src/apps/dsa.c +++ b/src/lib/libssl/src/apps/dsa.c | |||
| @@ -71,8 +71,6 @@ | |||
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | #include <openssl/bn.h> | 72 | #include <openssl/bn.h> |
| 73 | 73 | ||
| 74 | #undef PROG | ||
| 75 | #define PROG dsa_main | ||
| 76 | 74 | ||
| 77 | /* -inform arg - input format - default PEM (one of DER, NET or PEM) | 75 | /* -inform arg - input format - default PEM (one of DER, NET or PEM) |
| 78 | * -outform arg - output format - default PEM | 76 | * -outform arg - output format - default PEM |
| @@ -92,10 +90,10 @@ | |||
| 92 | * -modulus - print the DSA public key | 90 | * -modulus - print the DSA public key |
| 93 | */ | 91 | */ |
| 94 | 92 | ||
| 95 | int MAIN(int, char **); | 93 | int dsa_main(int, char **); |
| 96 | 94 | ||
| 97 | int | 95 | int |
| 98 | MAIN(int argc, char **argv) | 96 | dsa_main(int argc, char **argv) |
| 99 | { | 97 | { |
| 100 | ENGINE *e = NULL; | 98 | ENGINE *e = NULL; |
| 101 | int ret = 1; | 99 | int ret = 1; |
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c index e2ae9bec19..4b4f98fec6 100644 --- a/src/lib/libssl/src/apps/dsaparam.c +++ b/src/lib/libssl/src/apps/dsaparam.c | |||
| @@ -77,8 +77,6 @@ | |||
| 77 | #include <openssl/x509.h> | 77 | #include <openssl/x509.h> |
| 78 | #include <openssl/pem.h> | 78 | #include <openssl/pem.h> |
| 79 | 79 | ||
| 80 | #undef PROG | ||
| 81 | #define PROG dsaparam_main | ||
| 82 | 80 | ||
| 83 | /* -inform arg - input format - default PEM (DER or PEM) | 81 | /* -inform arg - input format - default PEM (DER or PEM) |
| 84 | * -outform arg - output format - default PEM | 82 | * -outform arg - output format - default PEM |
| @@ -108,10 +106,10 @@ timebomb_sigalarm(int foo) | |||
| 108 | 106 | ||
| 109 | static int dsa_cb(int p, int n, BN_GENCB * cb); | 107 | static int dsa_cb(int p, int n, BN_GENCB * cb); |
| 110 | 108 | ||
| 111 | int MAIN(int, char **); | 109 | int dsaparam_main(int, char **); |
| 112 | 110 | ||
| 113 | int | 111 | int |
| 114 | MAIN(int argc, char **argv) | 112 | dsaparam_main(int argc, char **argv) |
| 115 | { | 113 | { |
| 116 | DSA *dsa = NULL; | 114 | DSA *dsa = NULL; |
| 117 | int i, badops = 0, text = 0; | 115 | int i, badops = 0, text = 0; |
diff --git a/src/lib/libssl/src/apps/ec.c b/src/lib/libssl/src/apps/ec.c index 2d5525d508..561b6847aa 100644 --- a/src/lib/libssl/src/apps/ec.c +++ b/src/lib/libssl/src/apps/ec.c | |||
| @@ -67,8 +67,6 @@ | |||
| 67 | #include <openssl/evp.h> | 67 | #include <openssl/evp.h> |
| 68 | #include <openssl/pem.h> | 68 | #include <openssl/pem.h> |
| 69 | 69 | ||
| 70 | #undef PROG | ||
| 71 | #define PROG ec_main | ||
| 72 | 70 | ||
| 73 | /* -inform arg - input format - default PEM (one of DER, NET or PEM) | 71 | /* -inform arg - input format - default PEM (one of DER, NET or PEM) |
| 74 | * -outform arg - output format - default PEM | 72 | * -outform arg - output format - default PEM |
| @@ -81,10 +79,10 @@ | |||
| 81 | * -param_enc arg - specifies the parameter encoding | 79 | * -param_enc arg - specifies the parameter encoding |
| 82 | */ | 80 | */ |
| 83 | 81 | ||
| 84 | int MAIN(int, char **); | 82 | int ec_main(int, char **); |
| 85 | 83 | ||
| 86 | int | 84 | int |
| 87 | MAIN(int argc, char **argv) | 85 | ec_main(int argc, char **argv) |
| 88 | { | 86 | { |
| 89 | int ret = 1; | 87 | int ret = 1; |
| 90 | EC_KEY *eckey = NULL; | 88 | EC_KEY *eckey = NULL; |
diff --git a/src/lib/libssl/src/apps/ecparam.c b/src/lib/libssl/src/apps/ecparam.c index e4b7790f18..fee53257a9 100644 --- a/src/lib/libssl/src/apps/ecparam.c +++ b/src/lib/libssl/src/apps/ecparam.c | |||
| @@ -84,8 +84,6 @@ | |||
| 84 | #include <openssl/x509.h> | 84 | #include <openssl/x509.h> |
| 85 | #include <openssl/pem.h> | 85 | #include <openssl/pem.h> |
| 86 | 86 | ||
| 87 | #undef PROG | ||
| 88 | #define PROG ecparam_main | ||
| 89 | 87 | ||
| 90 | /* -inform arg - input format - default PEM (DER or PEM) | 88 | /* -inform arg - input format - default PEM (DER or PEM) |
| 91 | * -outform arg - output format - default PEM | 89 | * -outform arg - output format - default PEM |
| @@ -114,10 +112,10 @@ | |||
| 114 | 112 | ||
| 115 | static int ecparam_print_var(BIO *, BIGNUM *, const char *, int, unsigned char *); | 113 | static int ecparam_print_var(BIO *, BIGNUM *, const char *, int, unsigned char *); |
| 116 | 114 | ||
| 117 | int MAIN(int, char **); | 115 | int ecparam_main(int, char **); |
| 118 | 116 | ||
| 119 | int | 117 | int |
| 120 | MAIN(int argc, char **argv) | 118 | ecparam_main(int argc, char **argv) |
| 121 | { | 119 | { |
| 122 | EC_GROUP *group = NULL; | 120 | EC_GROUP *group = NULL; |
| 123 | point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; | 121 | point_conversion_form_t form = POINT_CONVERSION_UNCOMPRESSED; |
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c index ce54c39e3f..18760113c1 100644 --- a/src/lib/libssl/src/apps/enc.c +++ b/src/lib/libssl/src/apps/enc.c | |||
| @@ -73,7 +73,6 @@ | |||
| 73 | int set_hex(char *in, unsigned char *out, int size); | 73 | int set_hex(char *in, unsigned char *out, int size); |
| 74 | #undef SIZE | 74 | #undef SIZE |
| 75 | #undef BSIZE | 75 | #undef BSIZE |
| 76 | #undef PROG | ||
| 77 | 76 | ||
| 78 | #define SIZE (512) | 77 | #define SIZE (512) |
| 79 | #define BSIZE (8*1024) | 78 | #define BSIZE (8*1024) |
| @@ -96,10 +95,10 @@ show_ciphers(const OBJ_NAME * name, void *bio_) | |||
| 96 | BIO_printf(bio, " "); | 95 | BIO_printf(bio, " "); |
| 97 | } | 96 | } |
| 98 | 97 | ||
| 99 | int MAIN(int, char **); | 98 | int enc_main(int, char **); |
| 100 | 99 | ||
| 101 | int | 100 | int |
| 102 | MAIN(int argc, char **argv) | 101 | enc_main(int argc, char **argv) |
| 103 | { | 102 | { |
| 104 | static const char magic[] = "Salted__"; | 103 | static const char magic[] = "Salted__"; |
| 105 | char mbuf[sizeof magic - 1]; | 104 | char mbuf[sizeof magic - 1]; |
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c index 5cfd3e7677..5ed33d0d39 100644 --- a/src/lib/libssl/src/apps/engine.c +++ b/src/lib/libssl/src/apps/engine.c | |||
| @@ -69,8 +69,6 @@ | |||
| 69 | #include <openssl/engine.h> | 69 | #include <openssl/engine.h> |
| 70 | #include <openssl/ssl.h> | 70 | #include <openssl/ssl.h> |
| 71 | 71 | ||
| 72 | #undef PROG | ||
| 73 | #define PROG engine_main | ||
| 74 | 72 | ||
| 75 | static const char *engine_usage[] = { | 73 | static const char *engine_usage[] = { |
| 76 | "usage: engine opts [engine ...]\n", | 74 | "usage: engine opts [engine ...]\n", |
| @@ -325,10 +323,10 @@ util_do_cmds(ENGINE * e, STACK_OF(OPENSSL_STRING) * cmds, | |||
| 325 | } | 323 | } |
| 326 | } | 324 | } |
| 327 | 325 | ||
| 328 | int MAIN(int, char **); | 326 | int engine_main(int, char **); |
| 329 | 327 | ||
| 330 | int | 328 | int |
| 331 | MAIN(int argc, char **argv) | 329 | engine_main(int argc, char **argv) |
| 332 | { | 330 | { |
| 333 | int ret = 1, i; | 331 | int ret = 1, i; |
| 334 | const char **pp; | 332 | const char **pp; |
diff --git a/src/lib/libssl/src/apps/errstr.c b/src/lib/libssl/src/apps/errstr.c index 77d2ea6a7c..7147084704 100644 --- a/src/lib/libssl/src/apps/errstr.c +++ b/src/lib/libssl/src/apps/errstr.c | |||
| @@ -65,13 +65,11 @@ | |||
| 65 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
| 66 | #include <openssl/ssl.h> | 66 | #include <openssl/ssl.h> |
| 67 | 67 | ||
| 68 | #undef PROG | ||
| 69 | #define PROG errstr_main | ||
| 70 | 68 | ||
| 71 | int MAIN(int, char **); | 69 | int errstr_main(int, char **); |
| 72 | 70 | ||
| 73 | int | 71 | int |
| 74 | MAIN(int argc, char **argv) | 72 | errstr_main(int argc, char **argv) |
| 75 | { | 73 | { |
| 76 | int i, ret = 0; | 74 | int i, ret = 0; |
| 77 | char buf[256]; | 75 | char buf[256]; |
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c index 644ef87bd2..6e03c8ab16 100644 --- a/src/lib/libssl/src/apps/gendh.c +++ b/src/lib/libssl/src/apps/gendh.c | |||
| @@ -79,15 +79,13 @@ | |||
| 79 | #include <openssl/pem.h> | 79 | #include <openssl/pem.h> |
| 80 | 80 | ||
| 81 | #define DEFBITS 512 | 81 | #define DEFBITS 512 |
| 82 | #undef PROG | ||
| 83 | #define PROG gendh_main | ||
| 84 | 82 | ||
| 85 | static int dh_cb(int p, int n, BN_GENCB * cb); | 83 | static int dh_cb(int p, int n, BN_GENCB * cb); |
| 86 | 84 | ||
| 87 | int MAIN(int, char **); | 85 | int gendh_main(int, char **); |
| 88 | 86 | ||
| 89 | int | 87 | int |
| 90 | MAIN(int argc, char **argv) | 88 | gendh_main(int argc, char **argv) |
| 91 | { | 89 | { |
| 92 | BN_GENCB cb; | 90 | BN_GENCB cb; |
| 93 | DH *dh = NULL; | 91 | DH *dh = NULL; |
diff --git a/src/lib/libssl/src/apps/gendsa.c b/src/lib/libssl/src/apps/gendsa.c index 2042f69f68..9d89cd07cb 100644 --- a/src/lib/libssl/src/apps/gendsa.c +++ b/src/lib/libssl/src/apps/gendsa.c | |||
| @@ -71,13 +71,11 @@ | |||
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | 72 | ||
| 73 | #define DEFBITS 512 | 73 | #define DEFBITS 512 |
| 74 | #undef PROG | ||
| 75 | #define PROG gendsa_main | ||
| 76 | 74 | ||
| 77 | int MAIN(int, char **); | 75 | int gendsa_main(int, char **); |
| 78 | 76 | ||
| 79 | int | 77 | int |
| 80 | MAIN(int argc, char **argv) | 78 | gendsa_main(int argc, char **argv) |
| 81 | { | 79 | { |
| 82 | DSA *dsa = NULL; | 80 | DSA *dsa = NULL; |
| 83 | int ret = 1; | 81 | int ret = 1; |
diff --git a/src/lib/libssl/src/apps/genpkey.c b/src/lib/libssl/src/apps/genpkey.c index ec7e5b2f25..242da0e0aa 100644 --- a/src/lib/libssl/src/apps/genpkey.c +++ b/src/lib/libssl/src/apps/genpkey.c | |||
| @@ -70,12 +70,11 @@ init_keygen_file(BIO * err, EVP_PKEY_CTX ** pctx, const char *file, | |||
| 70 | ENGINE * e); | 70 | ENGINE * e); |
| 71 | static int genpkey_cb(EVP_PKEY_CTX * ctx); | 71 | static int genpkey_cb(EVP_PKEY_CTX * ctx); |
| 72 | 72 | ||
| 73 | #define PROG genpkey_main | ||
| 74 | 73 | ||
| 75 | int MAIN(int, char **); | 74 | int genpkey_main(int, char **); |
| 76 | 75 | ||
| 77 | int | 76 | int |
| 78 | MAIN(int argc, char **argv) | 77 | genpkey_main(int argc, char **argv) |
| 79 | { | 78 | { |
| 80 | ENGINE *e = NULL; | 79 | ENGINE *e = NULL; |
| 81 | char **args, *outfile = NULL; | 80 | char **args, *outfile = NULL; |
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index 67e68fc20a..98ab23a571 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
| @@ -79,15 +79,13 @@ | |||
| 79 | #include <openssl/rand.h> | 79 | #include <openssl/rand.h> |
| 80 | 80 | ||
| 81 | #define DEFBITS 1024 | 81 | #define DEFBITS 1024 |
| 82 | #undef PROG | ||
| 83 | #define PROG genrsa_main | ||
| 84 | 82 | ||
| 85 | static int genrsa_cb(int p, int n, BN_GENCB * cb); | 83 | static int genrsa_cb(int p, int n, BN_GENCB * cb); |
| 86 | 84 | ||
| 87 | int MAIN(int, char **); | 85 | int genrsa_main(int, char **); |
| 88 | 86 | ||
| 89 | int | 87 | int |
| 90 | MAIN(int argc, char **argv) | 88 | genrsa_main(int argc, char **argv) |
| 91 | { | 89 | { |
| 92 | BN_GENCB cb; | 90 | BN_GENCB cb; |
| 93 | #ifndef OPENSSL_NO_ENGINE | 91 | #ifndef OPENSSL_NO_ENGINE |
diff --git a/src/lib/libssl/src/apps/nseq.c b/src/lib/libssl/src/apps/nseq.c index 43f3073635..120792edbc 100644 --- a/src/lib/libssl/src/apps/nseq.c +++ b/src/lib/libssl/src/apps/nseq.c | |||
| @@ -62,13 +62,11 @@ | |||
| 62 | #include <openssl/pem.h> | 62 | #include <openssl/pem.h> |
| 63 | #include <openssl/err.h> | 63 | #include <openssl/err.h> |
| 64 | 64 | ||
| 65 | #undef PROG | ||
| 66 | #define PROG nseq_main | ||
| 67 | 65 | ||
| 68 | int MAIN(int, char **); | 66 | int nseq_main(int, char **); |
| 69 | 67 | ||
| 70 | int | 68 | int |
| 71 | MAIN(int argc, char **argv) | 69 | nseq_main(int argc, char **argv) |
| 72 | { | 70 | { |
| 73 | char **args, *infile = NULL, *outfile = NULL; | 71 | char **args, *infile = NULL, *outfile = NULL; |
| 74 | BIO *in = NULL, *out = NULL; | 72 | BIO *in = NULL, *out = NULL; |
diff --git a/src/lib/libssl/src/apps/ocsp.c b/src/lib/libssl/src/apps/ocsp.c index fa964b8125..a16237c1f8 100644 --- a/src/lib/libssl/src/apps/ocsp.c +++ b/src/lib/libssl/src/apps/ocsp.c | |||
| @@ -97,12 +97,10 @@ add_ocsp_cert(OCSP_REQUEST ** req, X509 * cert, const EVP_MD * cert_id_md, X509 | |||
| 97 | STACK_OF(CONF_VALUE) * headers, | 97 | STACK_OF(CONF_VALUE) * headers, |
| 98 | OCSP_REQUEST * req, int req_timeout); | 98 | OCSP_REQUEST * req, int req_timeout); |
| 99 | 99 | ||
| 100 | #undef PROG | ||
| 101 | #define PROG ocsp_main | ||
| 102 | 100 | ||
| 103 | int MAIN(int, char **); | 101 | int ocsp_main(int, char **); |
| 104 | 102 | ||
| 105 | int MAIN(int argc, char **argv) | 103 | int ocsp_main(int argc, char **argv) |
| 106 | { | 104 | { |
| 107 | ENGINE *e = NULL; | 105 | ENGINE *e = NULL; |
| 108 | char **args; | 106 | char **args; |
diff --git a/src/lib/libssl/src/apps/passwd.c b/src/lib/libssl/src/apps/passwd.c index 92f6b776b6..09c427065a 100644 --- a/src/lib/libssl/src/apps/passwd.c +++ b/src/lib/libssl/src/apps/passwd.c | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | #undef PROG | ||
| 27 | #define PROG passwd_main | ||
| 28 | 26 | ||
| 29 | 27 | ||
| 30 | static unsigned const char cov_2char[64] = { | 28 | static unsigned const char cov_2char[64] = { |
| @@ -56,10 +54,10 @@ do_passwd(int passed_salt, char **salt_p, char **salt_malloc_p, | |||
| 56 | * -reverse - switch table columns | 54 | * -reverse - switch table columns |
| 57 | */ | 55 | */ |
| 58 | 56 | ||
| 59 | int MAIN(int, char **); | 57 | int passwd_main(int, char **); |
| 60 | 58 | ||
| 61 | int | 59 | int |
| 62 | MAIN(int argc, char **argv) | 60 | passwd_main(int argc, char **argv) |
| 63 | { | 61 | { |
| 64 | int ret = 1; | 62 | int ret = 1; |
| 65 | char *infile = NULL; | 63 | char *infile = NULL; |
| @@ -466,7 +464,7 @@ err: | |||
| 466 | #else | 464 | #else |
| 467 | 465 | ||
| 468 | int | 466 | int |
| 469 | MAIN(int argc, char **argv) | 467 | passwd_main(int argc, char **argv) |
| 470 | { | 468 | { |
| 471 | fputs("Program not available.\n", stderr) | 469 | fputs("Program not available.\n", stderr) |
| 472 | return (1); | 470 | return (1); |
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c index 783abe277e..58a7224c65 100644 --- a/src/lib/libssl/src/apps/pkcs12.c +++ b/src/lib/libssl/src/apps/pkcs12.c | |||
| @@ -68,7 +68,6 @@ | |||
| 68 | #include <openssl/pem.h> | 68 | #include <openssl/pem.h> |
| 69 | #include <openssl/pkcs12.h> | 69 | #include <openssl/pkcs12.h> |
| 70 | 70 | ||
| 71 | #define PROG pkcs12_main | ||
| 72 | 71 | ||
| 73 | const EVP_CIPHER *enc; | 72 | const EVP_CIPHER *enc; |
| 74 | 73 | ||
| @@ -91,9 +90,9 @@ dump_certs_pkeys_bags(BIO * out, STACK_OF(PKCS12_SAFEBAG) * bags, char *pass, | |||
| 91 | int cert_load(BIO * in, STACK_OF(X509) * sk); | 90 | int cert_load(BIO * in, STACK_OF(X509) * sk); |
| 92 | static int set_pbe(BIO * err, int *ppbe, const char *str); | 91 | static int set_pbe(BIO * err, int *ppbe, const char *str); |
| 93 | 92 | ||
| 94 | int MAIN(int, char **); | 93 | int pkcs12_main(int, char **); |
| 95 | 94 | ||
| 96 | int MAIN(int argc, char **argv) | 95 | int pkcs12_main(int argc, char **argv) |
| 97 | { | 96 | { |
| 98 | ENGINE *e = NULL; | 97 | ENGINE *e = NULL; |
| 99 | char *infile = NULL, *outfile = NULL, *keyname = NULL; | 98 | char *infile = NULL, *outfile = NULL, *keyname = NULL; |
diff --git a/src/lib/libssl/src/apps/pkcs7.c b/src/lib/libssl/src/apps/pkcs7.c index 3c5cf09680..41c9689cc7 100644 --- a/src/lib/libssl/src/apps/pkcs7.c +++ b/src/lib/libssl/src/apps/pkcs7.c | |||
| @@ -68,8 +68,6 @@ | |||
| 68 | #include <openssl/pkcs7.h> | 68 | #include <openssl/pkcs7.h> |
| 69 | #include <openssl/pem.h> | 69 | #include <openssl/pem.h> |
| 70 | 70 | ||
| 71 | #undef PROG | ||
| 72 | #define PROG pkcs7_main | ||
| 73 | 71 | ||
| 74 | /* -inform arg - input format - default PEM (DER or PEM) | 72 | /* -inform arg - input format - default PEM (DER or PEM) |
| 75 | * -outform arg - output format - default PEM | 73 | * -outform arg - output format - default PEM |
| @@ -78,10 +76,10 @@ | |||
| 78 | * -print_certs | 76 | * -print_certs |
| 79 | */ | 77 | */ |
| 80 | 78 | ||
| 81 | int MAIN(int, char **); | 79 | int pkcs7_main(int, char **); |
| 82 | 80 | ||
| 83 | int | 81 | int |
| 84 | MAIN(int argc, char **argv) | 82 | pkcs7_main(int argc, char **argv) |
| 85 | { | 83 | { |
| 86 | PKCS7 *p7 = NULL; | 84 | PKCS7 *p7 = NULL; |
| 87 | int i, badops = 0; | 85 | int i, badops = 0; |
diff --git a/src/lib/libssl/src/apps/pkcs8.c b/src/lib/libssl/src/apps/pkcs8.c index 089511ee2a..a0f0ef9b57 100644 --- a/src/lib/libssl/src/apps/pkcs8.c +++ b/src/lib/libssl/src/apps/pkcs8.c | |||
| @@ -63,12 +63,11 @@ | |||
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | #include <openssl/pkcs12.h> | 64 | #include <openssl/pkcs12.h> |
| 65 | 65 | ||
| 66 | #define PROG pkcs8_main | ||
| 67 | 66 | ||
| 68 | int MAIN(int, char **); | 67 | int pkcs8_main(int, char **); |
| 69 | 68 | ||
| 70 | int | 69 | int |
| 71 | MAIN(int argc, char **argv) | 70 | pkcs8_main(int argc, char **argv) |
| 72 | { | 71 | { |
| 73 | ENGINE *e = NULL; | 72 | ENGINE *e = NULL; |
| 74 | char **args, *infile = NULL, *outfile = NULL; | 73 | char **args, *infile = NULL, *outfile = NULL; |
diff --git a/src/lib/libssl/src/apps/pkey.c b/src/lib/libssl/src/apps/pkey.c index 963ab92368..bd439cbf79 100644 --- a/src/lib/libssl/src/apps/pkey.c +++ b/src/lib/libssl/src/apps/pkey.c | |||
| @@ -62,12 +62,11 @@ | |||
| 62 | #include <openssl/err.h> | 62 | #include <openssl/err.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | 64 | ||
| 65 | #define PROG pkey_main | ||
| 66 | 65 | ||
| 67 | int MAIN(int, char **); | 66 | int pkey_main(int, char **); |
| 68 | 67 | ||
| 69 | int | 68 | int |
| 70 | MAIN(int argc, char **argv) | 69 | pkey_main(int argc, char **argv) |
| 71 | { | 70 | { |
| 72 | ENGINE *e = NULL; | 71 | ENGINE *e = NULL; |
| 73 | char **args, *infile = NULL, *outfile = NULL; | 72 | char **args, *infile = NULL, *outfile = NULL; |
diff --git a/src/lib/libssl/src/apps/pkeyparam.c b/src/lib/libssl/src/apps/pkeyparam.c index 06c295dfe8..b653dee794 100644 --- a/src/lib/libssl/src/apps/pkeyparam.c +++ b/src/lib/libssl/src/apps/pkeyparam.c | |||
| @@ -62,12 +62,11 @@ | |||
| 62 | #include <openssl/err.h> | 62 | #include <openssl/err.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | 64 | ||
| 65 | #define PROG pkeyparam_main | ||
| 66 | 65 | ||
| 67 | int MAIN(int, char **); | 66 | int pkeyparam_main(int, char **); |
| 68 | 67 | ||
| 69 | int | 68 | int |
| 70 | MAIN(int argc, char **argv) | 69 | pkeyparam_main(int argc, char **argv) |
| 71 | { | 70 | { |
| 72 | char **args, *infile = NULL, *outfile = NULL; | 71 | char **args, *infile = NULL, *outfile = NULL; |
| 73 | BIO *in = NULL, *out = NULL; | 72 | BIO *in = NULL, *out = NULL; |
diff --git a/src/lib/libssl/src/apps/pkeyutl.c b/src/lib/libssl/src/apps/pkeyutl.c index 226bb25220..7bac41c3a8 100644 --- a/src/lib/libssl/src/apps/pkeyutl.c +++ b/src/lib/libssl/src/apps/pkeyutl.c | |||
| @@ -68,9 +68,7 @@ | |||
| 68 | 68 | ||
| 69 | static void usage(void); | 69 | static void usage(void); |
| 70 | 70 | ||
| 71 | #undef PROG | ||
| 72 | 71 | ||
| 73 | #define PROG pkeyutl_main | ||
| 74 | 72 | ||
| 75 | static EVP_PKEY_CTX * | 73 | static EVP_PKEY_CTX * |
| 76 | init_ctx(int *pkeysize, | 74 | init_ctx(int *pkeysize, |
| @@ -86,10 +84,10 @@ do_keyop(EVP_PKEY_CTX * ctx, int pkey_op, | |||
| 86 | unsigned char *out, size_t * poutlen, | 84 | unsigned char *out, size_t * poutlen, |
| 87 | unsigned char *in, size_t inlen); | 85 | unsigned char *in, size_t inlen); |
| 88 | 86 | ||
| 89 | int MAIN(int argc, char **); | 87 | int pkeyutl_main(int argc, char **); |
| 90 | 88 | ||
| 91 | int | 89 | int |
| 92 | MAIN(int argc, char **argv) | 90 | pkeyutl_main(int argc, char **argv) |
| 93 | { | 91 | { |
| 94 | BIO *in = NULL, *out = NULL; | 92 | BIO *in = NULL, *out = NULL; |
| 95 | char *infile = NULL, *outfile = NULL, *sigfile = NULL; | 93 | char *infile = NULL, *outfile = NULL, *sigfile = NULL; |
diff --git a/src/lib/libssl/src/apps/prime.c b/src/lib/libssl/src/apps/prime.c index 4bd53a69bf..44998cde0f 100644 --- a/src/lib/libssl/src/apps/prime.c +++ b/src/lib/libssl/src/apps/prime.c | |||
| @@ -53,13 +53,11 @@ | |||
| 53 | #include <openssl/bn.h> | 53 | #include <openssl/bn.h> |
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | #undef PROG | ||
| 57 | #define PROG prime_main | ||
| 58 | 56 | ||
| 59 | int MAIN(int, char **); | 57 | int prime_main(int, char **); |
| 60 | 58 | ||
| 61 | int | 59 | int |
| 62 | MAIN(int argc, char **argv) | 60 | prime_main(int argc, char **argv) |
| 63 | { | 61 | { |
| 64 | int hex = 0; | 62 | int hex = 0; |
| 65 | int checks = 20; | 63 | int checks = 20; |
diff --git a/src/lib/libssl/src/apps/rand.c b/src/lib/libssl/src/apps/rand.c index 443a64d848..6bb8bfb45d 100644 --- a/src/lib/libssl/src/apps/rand.c +++ b/src/lib/libssl/src/apps/rand.c | |||
| @@ -63,8 +63,6 @@ | |||
| 63 | #include <openssl/err.h> | 63 | #include <openssl/err.h> |
| 64 | #include <openssl/rand.h> | 64 | #include <openssl/rand.h> |
| 65 | 65 | ||
| 66 | #undef PROG | ||
| 67 | #define PROG rand_main | ||
| 68 | 66 | ||
| 69 | /* -out file - write to file | 67 | /* -out file - write to file |
| 70 | * -rand file:file - PRNG seed files | 68 | * -rand file:file - PRNG seed files |
| @@ -73,10 +71,10 @@ | |||
| 73 | * num - write 'num' bytes | 71 | * num - write 'num' bytes |
| 74 | */ | 72 | */ |
| 75 | 73 | ||
| 76 | int MAIN(int, char **); | 74 | int rand_main(int, char **); |
| 77 | 75 | ||
| 78 | int | 76 | int |
| 79 | MAIN(int argc, char **argv) | 77 | rand_main(int argc, char **argv) |
| 80 | { | 78 | { |
| 81 | int i, r, ret = 1; | 79 | int i, r, ret = 1; |
| 82 | int badopt; | 80 | int badopt; |
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 923837c4f9..fc4dc79090 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
| @@ -102,8 +102,6 @@ | |||
| 102 | #define DEFAULT_KEY_LENGTH 512 | 102 | #define DEFAULT_KEY_LENGTH 512 |
| 103 | #define MIN_KEY_LENGTH 384 | 103 | #define MIN_KEY_LENGTH 384 |
| 104 | 104 | ||
| 105 | #undef PROG | ||
| 106 | #define PROG req_main | ||
| 107 | 105 | ||
| 108 | /* -inform arg - input format - default PEM (DER or PEM) | 106 | /* -inform arg - input format - default PEM (DER or PEM) |
| 109 | * -outform arg - output format - default PEM | 107 | * -outform arg - output format - default PEM |
| @@ -153,9 +151,9 @@ prompt_info(X509_REQ * req, | |||
| 153 | static CONF *req_conf = NULL; | 151 | static CONF *req_conf = NULL; |
| 154 | static int batch = 0; | 152 | static int batch = 0; |
| 155 | 153 | ||
| 156 | int MAIN(int, char **); | 154 | int req_main(int, char **); |
| 157 | 155 | ||
| 158 | int MAIN(int argc, char **argv) | 156 | int req_main(int argc, char **argv) |
| 159 | { | 157 | { |
| 160 | ENGINE *e = NULL, *gen_eng = NULL; | 158 | ENGINE *e = NULL, *gen_eng = NULL; |
| 161 | unsigned long nmflag = 0, reqflag = 0; | 159 | unsigned long nmflag = 0, reqflag = 0; |
diff --git a/src/lib/libssl/src/apps/rsa.c b/src/lib/libssl/src/apps/rsa.c index e3f4989aeb..0e08d929ba 100644 --- a/src/lib/libssl/src/apps/rsa.c +++ b/src/lib/libssl/src/apps/rsa.c | |||
| @@ -71,8 +71,6 @@ | |||
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | #include <openssl/bn.h> | 72 | #include <openssl/bn.h> |
| 73 | 73 | ||
| 74 | #undef PROG | ||
| 75 | #define PROG rsa_main | ||
| 76 | 74 | ||
| 77 | /* -inform arg - input format - default PEM (one of DER, NET or PEM) | 75 | /* -inform arg - input format - default PEM (one of DER, NET or PEM) |
| 78 | * -outform arg - output format - default PEM | 76 | * -outform arg - output format - default PEM |
| @@ -95,10 +93,10 @@ | |||
| 95 | * -pubout - Output a public key. | 93 | * -pubout - Output a public key. |
| 96 | */ | 94 | */ |
| 97 | 95 | ||
| 98 | int MAIN(int, char **); | 96 | int rsa_main(int, char **); |
| 99 | 97 | ||
| 100 | int | 98 | int |
| 101 | MAIN(int argc, char **argv) | 99 | rsa_main(int argc, char **argv) |
| 102 | { | 100 | { |
| 103 | ENGINE *e = NULL; | 101 | ENGINE *e = NULL; |
| 104 | int ret = 1; | 102 | int ret = 1; |
diff --git a/src/lib/libssl/src/apps/rsautl.c b/src/lib/libssl/src/apps/rsautl.c index 9b8a040853..8848a4ac4b 100644 --- a/src/lib/libssl/src/apps/rsautl.c +++ b/src/lib/libssl/src/apps/rsautl.c | |||
| @@ -76,14 +76,12 @@ | |||
| 76 | 76 | ||
| 77 | static void usage(void); | 77 | static void usage(void); |
| 78 | 78 | ||
| 79 | #undef PROG | ||
| 80 | 79 | ||
| 81 | #define PROG rsautl_main | ||
| 82 | 80 | ||
| 83 | int MAIN(int argc, char **); | 81 | int rsautl_main(int argc, char **); |
| 84 | 82 | ||
| 85 | int | 83 | int |
| 86 | MAIN(int argc, char **argv) | 84 | rsautl_main(int argc, char **argv) |
| 87 | { | 85 | { |
| 88 | ENGINE *e = NULL; | 86 | ENGINE *e = NULL; |
| 89 | BIO *in = NULL, *out = NULL; | 87 | BIO *in = NULL, *out = NULL; |
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c index 20b0ace583..41911bcd24 100644 --- a/src/lib/libssl/src/apps/s_client.c +++ b/src/lib/libssl/src/apps/s_client.c | |||
| @@ -167,8 +167,6 @@ | |||
| 167 | #include "timeouts.h" | 167 | #include "timeouts.h" |
| 168 | 168 | ||
| 169 | 169 | ||
| 170 | #undef PROG | ||
| 171 | #define PROG s_client_main | ||
| 172 | 170 | ||
| 173 | /*#define SSL_HOST_NAME "www.netscape.com" */ | 171 | /*#define SSL_HOST_NAME "www.netscape.com" */ |
| 174 | /*#define SSL_HOST_NAME "193.118.187.102" */ | 172 | /*#define SSL_HOST_NAME "193.118.187.102" */ |
| @@ -543,10 +541,10 @@ enum { | |||
| 543 | PROTO_XMPP | 541 | PROTO_XMPP |
| 544 | }; | 542 | }; |
| 545 | 543 | ||
| 546 | int MAIN(int, char **); | 544 | int s_client_main(int, char **); |
| 547 | 545 | ||
| 548 | int | 546 | int |
| 549 | MAIN(int argc, char **argv) | 547 | s_client_main(int argc, char **argv) |
| 550 | { | 548 | { |
| 551 | unsigned int off = 0, clr = 0; | 549 | unsigned int off = 0, clr = 0; |
| 552 | SSL *con = NULL; | 550 | SSL *con = NULL; |
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index fb44573854..ebe205c4ab 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
| @@ -242,8 +242,6 @@ static int accept_socket = -1; | |||
| 242 | #ifndef OPENSSL_NO_TLSEXT | 242 | #ifndef OPENSSL_NO_TLSEXT |
| 243 | #define TEST_CERT2 "server2.pem" | 243 | #define TEST_CERT2 "server2.pem" |
| 244 | #endif | 244 | #endif |
| 245 | #undef PROG | ||
| 246 | #define PROG s_server_main | ||
| 247 | 245 | ||
| 248 | extern int verify_depth, verify_return_error; | 246 | extern int verify_depth, verify_return_error; |
| 249 | 247 | ||
| @@ -733,7 +731,7 @@ next_proto_cb(SSL * s, const unsigned char **data, unsigned int *len, void *arg) | |||
| 733 | 731 | ||
| 734 | #endif | 732 | #endif |
| 735 | 733 | ||
| 736 | int MAIN(int, char **); | 734 | int s_server_main(int, char **); |
| 737 | 735 | ||
| 738 | #ifndef OPENSSL_NO_JPAKE | 736 | #ifndef OPENSSL_NO_JPAKE |
| 739 | static char *jpake_secret = NULL; | 737 | static char *jpake_secret = NULL; |
| @@ -746,7 +744,7 @@ static char *srtp_profiles = NULL; | |||
| 746 | #endif | 744 | #endif |
| 747 | 745 | ||
| 748 | int | 746 | int |
| 749 | MAIN(int argc, char *argv[]) | 747 | s_server_main(int argc, char *argv[]) |
| 750 | { | 748 | { |
| 751 | X509_VERIFY_PARAM *vpm = NULL; | 749 | X509_VERIFY_PARAM *vpm = NULL; |
| 752 | int badarg = 0; | 750 | int badarg = 0; |
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c index bb680c6c9a..f74c9b9c7f 100644 --- a/src/lib/libssl/src/apps/s_time.c +++ b/src/lib/libssl/src/apps/s_time.c | |||
| @@ -83,8 +83,6 @@ | |||
| 83 | #endif | 83 | #endif |
| 84 | #include <unistd.h> | 84 | #include <unistd.h> |
| 85 | 85 | ||
| 86 | #undef PROG | ||
| 87 | #define PROG s_time_main | ||
| 88 | 86 | ||
| 89 | #define SSL_CONNECT_NAME "localhost:4433" | 87 | #define SSL_CONNECT_NAME "localhost:4433" |
| 90 | 88 | ||
| @@ -321,10 +319,10 @@ tm_Time_F(int s) | |||
| 321 | * MAIN - main processing area for client | 319 | * MAIN - main processing area for client |
| 322 | * real name depends on MONOLITH | 320 | * real name depends on MONOLITH |
| 323 | */ | 321 | */ |
| 324 | int MAIN(int, char **); | 322 | int s_time_main(int, char **); |
| 325 | 323 | ||
| 326 | int | 324 | int |
| 327 | MAIN(int argc, char **argv) | 325 | s_time_main(int argc, char **argv) |
| 328 | { | 326 | { |
| 329 | double totalTime = 0.0; | 327 | double totalTime = 0.0; |
| 330 | int nConn = 0; | 328 | int nConn = 0; |
diff --git a/src/lib/libssl/src/apps/sess_id.c b/src/lib/libssl/src/apps/sess_id.c index b9750ab356..5ea5c97972 100644 --- a/src/lib/libssl/src/apps/sess_id.c +++ b/src/lib/libssl/src/apps/sess_id.c | |||
| @@ -66,8 +66,6 @@ | |||
| 66 | #include <openssl/pem.h> | 66 | #include <openssl/pem.h> |
| 67 | #include <openssl/ssl.h> | 67 | #include <openssl/ssl.h> |
| 68 | 68 | ||
| 69 | #undef PROG | ||
| 70 | #define PROG sess_id_main | ||
| 71 | 69 | ||
| 72 | static const char *sess_id_usage[] = { | 70 | static const char *sess_id_usage[] = { |
| 73 | "usage: sess_id args\n", | 71 | "usage: sess_id args\n", |
| @@ -85,10 +83,10 @@ static const char *sess_id_usage[] = { | |||
| 85 | 83 | ||
| 86 | static SSL_SESSION *load_sess_id(char *file, int format); | 84 | static SSL_SESSION *load_sess_id(char *file, int format); |
| 87 | 85 | ||
| 88 | int MAIN(int, char **); | 86 | int sess_id_main(int, char **); |
| 89 | 87 | ||
| 90 | int | 88 | int |
| 91 | MAIN(int argc, char **argv) | 89 | sess_id_main(int argc, char **argv) |
| 92 | { | 90 | { |
| 93 | SSL_SESSION *x = NULL; | 91 | SSL_SESSION *x = NULL; |
| 94 | X509 *peer = NULL; | 92 | X509 *peer = NULL; |
diff --git a/src/lib/libssl/src/apps/smime.c b/src/lib/libssl/src/apps/smime.c index 9332ae9095..22b28ce4b3 100644 --- a/src/lib/libssl/src/apps/smime.c +++ b/src/lib/libssl/src/apps/smime.c | |||
| @@ -67,8 +67,6 @@ | |||
| 67 | #include <openssl/x509_vfy.h> | 67 | #include <openssl/x509_vfy.h> |
| 68 | #include <openssl/x509v3.h> | 68 | #include <openssl/x509v3.h> |
| 69 | 69 | ||
| 70 | #undef PROG | ||
| 71 | #define PROG smime_main | ||
| 72 | static int save_certs(char *signerfile, STACK_OF(X509) * signers); | 70 | static int save_certs(char *signerfile, STACK_OF(X509) * signers); |
| 73 | static int smime_cb(int ok, X509_STORE_CTX * ctx); | 71 | static int smime_cb(int ok, X509_STORE_CTX * ctx); |
| 74 | 72 | ||
| @@ -82,10 +80,10 @@ static int smime_cb(int ok, X509_STORE_CTX * ctx); | |||
| 82 | #define SMIME_PK7OUT (5 | SMIME_IP | SMIME_OP) | 80 | #define SMIME_PK7OUT (5 | SMIME_IP | SMIME_OP) |
| 83 | #define SMIME_RESIGN (6 | SMIME_IP | SMIME_OP | SMIME_SIGNERS) | 81 | #define SMIME_RESIGN (6 | SMIME_IP | SMIME_OP | SMIME_SIGNERS) |
| 84 | 82 | ||
| 85 | int MAIN(int, char **); | 83 | int smime_main(int, char **); |
| 86 | 84 | ||
| 87 | int | 85 | int |
| 88 | MAIN(int argc, char **argv) | 86 | smime_main(int argc, char **argv) |
| 89 | { | 87 | { |
| 90 | ENGINE *e = NULL; | 88 | ENGINE *e = NULL; |
| 91 | int operation = 0; | 89 | int operation = 0; |
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c index 6b8610aa70..9ff417c993 100644 --- a/src/lib/libssl/src/apps/speed.c +++ b/src/lib/libssl/src/apps/speed.c | |||
| @@ -83,8 +83,6 @@ | |||
| 83 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ | 83 | /* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */ |
| 84 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ | 84 | /* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */ |
| 85 | 85 | ||
| 86 | #undef PROG | ||
| 87 | #define PROG speed_main | ||
| 88 | 86 | ||
| 89 | #include <stdio.h> | 87 | #include <stdio.h> |
| 90 | #include <stdlib.h> | 88 | #include <stdlib.h> |
| @@ -301,10 +299,10 @@ KDF1_SHA1(const void *in, size_t inlen, void *out, size_t * outlen) | |||
| 301 | #endif /* OPENSSL_NO_ECDH */ | 299 | #endif /* OPENSSL_NO_ECDH */ |
| 302 | 300 | ||
| 303 | 301 | ||
| 304 | int MAIN(int, char **); | 302 | int speed_main(int, char **); |
| 305 | 303 | ||
| 306 | int | 304 | int |
| 307 | MAIN(int argc, char **argv) | 305 | speed_main(int argc, char **argv) |
| 308 | { | 306 | { |
| 309 | unsigned char *buf = NULL, *buf2 = NULL; | 307 | unsigned char *buf = NULL, *buf2 = NULL; |
| 310 | int mret = 1; | 308 | int mret = 1; |
diff --git a/src/lib/libssl/src/apps/spkac.c b/src/lib/libssl/src/apps/spkac.c index 33ca993361..aa6be24361 100644 --- a/src/lib/libssl/src/apps/spkac.c +++ b/src/lib/libssl/src/apps/spkac.c | |||
| @@ -70,17 +70,15 @@ | |||
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | #include <openssl/pem.h> | 71 | #include <openssl/pem.h> |
| 72 | 72 | ||
| 73 | #undef PROG | ||
| 74 | #define PROG spkac_main | ||
| 75 | 73 | ||
| 76 | /* -in arg - input file - default stdin | 74 | /* -in arg - input file - default stdin |
| 77 | * -out arg - output file - default stdout | 75 | * -out arg - output file - default stdout |
| 78 | */ | 76 | */ |
| 79 | 77 | ||
| 80 | int MAIN(int, char **); | 78 | int spkac_main(int, char **); |
| 81 | 79 | ||
| 82 | int | 80 | int |
| 83 | MAIN(int argc, char **argv) | 81 | spkac_main(int argc, char **argv) |
| 84 | { | 82 | { |
| 85 | ENGINE *e = NULL; | 83 | ENGINE *e = NULL; |
| 86 | int i, badops = 0, ret = 1; | 84 | int i, badops = 0, ret = 1; |
diff --git a/src/lib/libssl/src/apps/srp.c b/src/lib/libssl/src/apps/srp.c index 1a874fbd6c..d68dc6c03a 100644 --- a/src/lib/libssl/src/apps/srp.c +++ b/src/lib/libssl/src/apps/srp.c | |||
| @@ -70,8 +70,6 @@ | |||
| 70 | 70 | ||
| 71 | #include "apps.h" | 71 | #include "apps.h" |
| 72 | 72 | ||
| 73 | #undef PROG | ||
| 74 | #define PROG srp_main | ||
| 75 | 73 | ||
| 76 | #define BASE_SECTION "srp" | 74 | #define BASE_SECTION "srp" |
| 77 | #define CONFIG_FILE "openssl.cnf" | 75 | #define CONFIG_FILE "openssl.cnf" |
| @@ -115,7 +113,7 @@ static char *section = NULL; | |||
| 115 | #define VVERBOSE if (verbose>1) | 113 | #define VVERBOSE if (verbose>1) |
| 116 | 114 | ||
| 117 | 115 | ||
| 118 | int MAIN(int, char **); | 116 | int srp_main(int, char **); |
| 119 | 117 | ||
| 120 | static int | 118 | static int |
| 121 | get_index(CA_DB * db, char *id, char type) | 119 | get_index(CA_DB * db, char *id, char type) |
| @@ -258,7 +256,7 @@ srp_create_user(char *user, char **srp_verifier, | |||
| 258 | } | 256 | } |
| 259 | 257 | ||
| 260 | int | 258 | int |
| 261 | MAIN(int argc, char **argv) | 259 | srp_main(int argc, char **argv) |
| 262 | { | 260 | { |
| 263 | int add_user = 0; | 261 | int add_user = 0; |
| 264 | int list_user = 0; | 262 | int list_user = 0; |
diff --git a/src/lib/libssl/src/apps/ts.c b/src/lib/libssl/src/apps/ts.c index 627e37549d..bac4b048f8 100644 --- a/src/lib/libssl/src/apps/ts.c +++ b/src/lib/libssl/src/apps/ts.c | |||
| @@ -67,8 +67,6 @@ | |||
| 67 | #include <openssl/ts.h> | 67 | #include <openssl/ts.h> |
| 68 | #include <openssl/bn.h> | 68 | #include <openssl/bn.h> |
| 69 | 69 | ||
| 70 | #undef PROG | ||
| 71 | #define PROG ts_main | ||
| 72 | 70 | ||
| 73 | /* Length of the nonce of the request in bits (must be a multiple of 8). */ | 71 | /* Length of the nonce of the request in bits (must be a multiple of 8). */ |
| 74 | #define NONCE_LENGTH 64 | 72 | #define NONCE_LENGTH 64 |
| @@ -127,10 +125,10 @@ static X509_STORE *create_cert_store(char *ca_path, char *ca_file); | |||
| 127 | static int verify_cb(int ok, X509_STORE_CTX * ctx); | 125 | static int verify_cb(int ok, X509_STORE_CTX * ctx); |
| 128 | 126 | ||
| 129 | /* Main function definition. */ | 127 | /* Main function definition. */ |
| 130 | int MAIN(int, char **); | 128 | int ts_main(int, char **); |
| 131 | 129 | ||
| 132 | int | 130 | int |
| 133 | MAIN(int argc, char **argv) | 131 | ts_main(int argc, char **argv) |
| 134 | { | 132 | { |
| 135 | int ret = 1; | 133 | int ret = 1; |
| 136 | char *configfile = NULL; | 134 | char *configfile = NULL; |
diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c index 3bb746a25e..0bfc0f4038 100644 --- a/src/lib/libssl/src/apps/verify.c +++ b/src/lib/libssl/src/apps/verify.c | |||
| @@ -66,8 +66,6 @@ | |||
| 66 | #include <openssl/x509v3.h> | 66 | #include <openssl/x509v3.h> |
| 67 | #include <openssl/pem.h> | 67 | #include <openssl/pem.h> |
| 68 | 68 | ||
| 69 | #undef PROG | ||
| 70 | #define PROG verify_main | ||
| 71 | 69 | ||
| 72 | static int cb(int ok, X509_STORE_CTX * ctx); | 70 | static int cb(int ok, X509_STORE_CTX * ctx); |
| 73 | static int | 71 | static int |
| @@ -76,9 +74,9 @@ check(X509_STORE * ctx, char *file, | |||
| 76 | STACK_OF(X509_CRL) * crls, ENGINE * e); | 74 | STACK_OF(X509_CRL) * crls, ENGINE * e); |
| 77 | static int v_verbose = 0, vflags = 0; | 75 | static int v_verbose = 0, vflags = 0; |
| 78 | 76 | ||
| 79 | int MAIN(int, char **); | 77 | int verify_main(int, char **); |
| 80 | 78 | ||
| 81 | int MAIN(int argc, char **argv) | 79 | int verify_main(int argc, char **argv) |
| 82 | { | 80 | { |
| 83 | ENGINE *e = NULL; | 81 | ENGINE *e = NULL; |
| 84 | int i, ret = 1, badarg = 0; | 82 | int i, ret = 1, badarg = 0; |
diff --git a/src/lib/libssl/src/apps/version.c b/src/lib/libssl/src/apps/version.c index 42920fc9f1..41fb22bc8c 100644 --- a/src/lib/libssl/src/apps/version.c +++ b/src/lib/libssl/src/apps/version.c | |||
| @@ -132,13 +132,11 @@ | |||
| 132 | #include <openssl/blowfish.h> | 132 | #include <openssl/blowfish.h> |
| 133 | #endif | 133 | #endif |
| 134 | 134 | ||
| 135 | #undef PROG | ||
| 136 | #define PROG version_main | ||
| 137 | 135 | ||
| 138 | int MAIN(int, char **); | 136 | int version_main(int, char **); |
| 139 | 137 | ||
| 140 | int | 138 | int |
| 141 | MAIN(int argc, char **argv) | 139 | version_main(int argc, char **argv) |
| 142 | { | 140 | { |
| 143 | int i, ret = 0; | 141 | int i, ret = 0; |
| 144 | int cflags = 0, version = 0, date = 0, options = 0, platform = 0, | 142 | int cflags = 0, version = 0, date = 0, options = 0, platform = 0, |
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c index cdeff65109..b9585da4e6 100644 --- a/src/lib/libssl/src/apps/x509.c +++ b/src/lib/libssl/src/apps/x509.c | |||
| @@ -80,8 +80,6 @@ | |||
| 80 | #include <openssl/dsa.h> | 80 | #include <openssl/dsa.h> |
| 81 | #endif | 81 | #endif |
| 82 | 82 | ||
| 83 | #undef PROG | ||
| 84 | #define PROG x509_main | ||
| 85 | 83 | ||
| 86 | #undef POSTFIX | 84 | #undef POSTFIX |
| 87 | #define POSTFIX ".srl" | 85 | #define POSTFIX ".srl" |
| @@ -166,9 +164,9 @@ x509_certify(X509_STORE * ctx, char *CAfile, const EVP_MD * digest, | |||
| 166 | static int purpose_print(BIO * bio, X509 * cert, X509_PURPOSE * pt); | 164 | static int purpose_print(BIO * bio, X509 * cert, X509_PURPOSE * pt); |
| 167 | static int reqfile = 0; | 165 | static int reqfile = 0; |
| 168 | 166 | ||
| 169 | int MAIN(int, char **); | 167 | int x509_main(int, char **); |
| 170 | 168 | ||
| 171 | int MAIN(int argc, char **argv) | 169 | int x509_main(int argc, char **argv) |
| 172 | { | 170 | { |
| 173 | ENGINE *e = NULL; | 171 | ENGINE *e = NULL; |
| 174 | int ret = 1; | 172 | int ret = 1; |
