diff options
author | deraadt <> | 2014-04-17 20:58:08 +0000 |
---|---|---|
committer | deraadt <> | 2014-04-17 20:58:08 +0000 |
commit | dea2616f54bc531ab8af0d74ac00fd23f61ba61d (patch) | |
tree | a5c70a75ed1efb1996231f6e5bcd7edfd923d47c | |
parent | 6800e69ce3db198d08e1e509efdb706f4d2b4cf0 (diff) | |
download | openbsd-dea2616f54bc531ab8af0d74ac00fd23f61ba61d.tar.gz openbsd-dea2616f54bc531ab8af0d74ac00fd23f61ba61d.tar.bz2 openbsd-dea2616f54bc531ab8af0d74ac00fd23f61ba61d.zip |
Mostly gut e_os.h:
USE_SOCKETS is unrelated to using sockets, but just pulls in .h files. It
makes every file buy a kitchen sink, because 11 files forgot to.
EXIT() is really exit(), a gentle surprise
but... OPENSSL_EXIT() is really just return(), because noone compiles the
openssl command non-monolithic anymore
59 files changed, 105 insertions, 134 deletions
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index 1ae9d96577..0972feeb58 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
@@ -59,16 +59,13 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <errno.h> | 61 | #include <errno.h> |
62 | #define USE_SOCKETS | ||
63 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
64 | #include <openssl/bio.h> | 63 | #include <openssl/bio.h> |
65 | #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK) | ||
66 | #include <netdb.h> | ||
67 | #if defined(NETWARE_CLIB) | ||
68 | #include <sys/ioctl.h> | 64 | #include <sys/ioctl.h> |
69 | NETDB_DEFINE_CONTEXT | 65 | |
70 | #endif | 66 | #include <netdb.h> |
71 | #endif | 67 | #include <sys/socket.h> |
68 | #include <netinet/in.h> | ||
72 | 69 | ||
73 | #ifndef OPENSSL_NO_SOCK | 70 | #ifndef OPENSSL_NO_SOCK |
74 | 71 | ||
diff --git a/src/lib/libcrypto/bio/bss_acpt.c b/src/lib/libcrypto/bio/bss_acpt.c index a272ada366..27a4d371dc 100644 --- a/src/lib/libcrypto/bio/bss_acpt.c +++ b/src/lib/libcrypto/bio/bss_acpt.c | |||
@@ -58,9 +58,9 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
63 | #include <sys/socket.h> | ||
64 | 64 | ||
65 | #ifndef OPENSSL_NO_SOCK | 65 | #ifndef OPENSSL_NO_SOCK |
66 | 66 | ||
diff --git a/src/lib/libcrypto/bio/bss_conn.c b/src/lib/libcrypto/bio/bss_conn.c index 9c5320cafb..46667bc7d6 100644 --- a/src/lib/libcrypto/bio/bss_conn.c +++ b/src/lib/libcrypto/bio/bss_conn.c | |||
@@ -58,9 +58,11 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
63 | #include <netdb.h> | ||
64 | #include <sys/socket.h> | ||
65 | #include <netinet/in.h> | ||
64 | 66 | ||
65 | #ifndef OPENSSL_NO_SOCK | 67 | #ifndef OPENSSL_NO_SOCK |
66 | 68 | ||
diff --git a/src/lib/libcrypto/bio/bss_dgram.c b/src/lib/libcrypto/bio/bss_dgram.c index 4c54601abc..50281b5650 100644 --- a/src/lib/libcrypto/bio/bss_dgram.c +++ b/src/lib/libcrypto/bio/bss_dgram.c | |||
@@ -60,10 +60,12 @@ | |||
60 | 60 | ||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include <errno.h> | 62 | #include <errno.h> |
63 | #define USE_SOCKETS | ||
64 | #include "cryptlib.h" | 63 | #include "cryptlib.h" |
65 | |||
66 | #include <openssl/bio.h> | 64 | #include <openssl/bio.h> |
65 | #include <netdb.h> | ||
66 | #include <sys/socket.h> | ||
67 | #include <netinet/in.h> | ||
68 | |||
67 | #ifndef OPENSSL_NO_DGRAM | 69 | #ifndef OPENSSL_NO_DGRAM |
68 | 70 | ||
69 | #ifndef OPENSSL_NO_SCTP | 71 | #ifndef OPENSSL_NO_SCTP |
diff --git a/src/lib/libcrypto/bio/bss_fd.c b/src/lib/libcrypto/bio/bss_fd.c index 4369d6411d..b84719c487 100644 --- a/src/lib/libcrypto/bio/bss_fd.c +++ b/src/lib/libcrypto/bio/bss_fd.c | |||
@@ -58,7 +58,6 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | 62 | ||
64 | #if defined(OPENSSL_NO_POSIX_IO) | 63 | #if defined(OPENSSL_NO_POSIX_IO) |
diff --git a/src/lib/libcrypto/bio/bss_sock.c b/src/lib/libcrypto/bio/bss_sock.c index 5335495c6e..7c499634fb 100644 --- a/src/lib/libcrypto/bio/bss_sock.c +++ b/src/lib/libcrypto/bio/bss_sock.c | |||
@@ -58,8 +58,8 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <sys/socket.h> | ||
63 | 63 | ||
64 | #ifndef OPENSSL_NO_SOCK | 64 | #ifndef OPENSSL_NO_SOCK |
65 | 65 | ||
diff --git a/src/lib/libcrypto/x509/by_dir.c b/src/lib/libcrypto/x509/by_dir.c index 76f8244f36..bc60331275 100644 --- a/src/lib/libcrypto/x509/by_dir.c +++ b/src/lib/libcrypto/x509/by_dir.c | |||
@@ -218,7 +218,7 @@ add_cert_dir(BY_DIR *ctx, const char *dir, int type) | |||
218 | s = dir; | 218 | s = dir; |
219 | p = s; | 219 | p = s; |
220 | do { | 220 | do { |
221 | if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) { | 221 | if ((*p == ':') || (*p == '\0')) { |
222 | BY_DIR_ENTRY *ent; | 222 | BY_DIR_ENTRY *ent; |
223 | ss = s; | 223 | ss = s; |
224 | s = p + 1; | 224 | s = p + 1; |
diff --git a/src/lib/libssl/s3_pkt.c b/src/lib/libssl/s3_pkt.c index c9a7b6cf07..d6c8756a1a 100644 --- a/src/lib/libssl/s3_pkt.c +++ b/src/lib/libssl/s3_pkt.c | |||
@@ -111,7 +111,6 @@ | |||
111 | 111 | ||
112 | #include <stdio.h> | 112 | #include <stdio.h> |
113 | #include <errno.h> | 113 | #include <errno.h> |
114 | #define USE_SOCKETS | ||
115 | #include "ssl_locl.h" | 114 | #include "ssl_locl.h" |
116 | #include <openssl/evp.h> | 115 | #include <openssl/evp.h> |
117 | #include <openssl/buffer.h> | 116 | #include <openssl/buffer.h> |
diff --git a/src/lib/libssl/src/apps/app_rand.c b/src/lib/libssl/src/apps/app_rand.c index 59fab2e269..0dbec7d595 100644 --- a/src/lib/libssl/src/apps/app_rand.c +++ b/src/lib/libssl/src/apps/app_rand.c | |||
@@ -164,7 +164,7 @@ app_RAND_load_files(char *name) | |||
164 | for (;;) { | 164 | for (;;) { |
165 | last = 0; | 165 | last = 0; |
166 | for (p = name; | 166 | for (p = name; |
167 | ((*p != '\0') && (*p != LIST_SEPARATOR_CHAR)); p++); | 167 | ((*p != '\0') && (*p != ':')); p++); |
168 | if (*p == '\0') | 168 | if (*p == '\0') |
169 | last = 1; | 169 | last = 1; |
170 | *p = '\0'; | 170 | *p = '\0'; |
diff --git a/src/lib/libssl/src/apps/asn1pars.c b/src/lib/libssl/src/apps/asn1pars.c index 246308f127..95fc88d644 100644 --- a/src/lib/libssl/src/apps/asn1pars.c +++ b/src/lib/libssl/src/apps/asn1pars.c | |||
@@ -355,7 +355,7 @@ end: | |||
355 | sk_OPENSSL_STRING_free(osk); | 355 | sk_OPENSSL_STRING_free(osk); |
356 | OBJ_cleanup(); | 356 | OBJ_cleanup(); |
357 | apps_shutdown(); | 357 | apps_shutdown(); |
358 | OPENSSL_EXIT(ret); | 358 | return(ret); |
359 | } | 359 | } |
360 | 360 | ||
361 | static int | 361 | static int |
diff --git a/src/lib/libssl/src/apps/ca.c b/src/lib/libssl/src/apps/ca.c index 9c75e1a4f4..cd3304717b 100644 --- a/src/lib/libssl/src/apps/ca.c +++ b/src/lib/libssl/src/apps/ca.c | |||
@@ -1411,7 +1411,7 @@ err: | |||
1411 | NCONF_free(extconf); | 1411 | NCONF_free(extconf); |
1412 | OBJ_cleanup(); | 1412 | OBJ_cleanup(); |
1413 | apps_shutdown(); | 1413 | apps_shutdown(); |
1414 | OPENSSL_EXIT(ret); | 1414 | return(ret); |
1415 | } | 1415 | } |
1416 | 1416 | ||
1417 | static void | 1417 | static void |
diff --git a/src/lib/libssl/src/apps/ciphers.c b/src/lib/libssl/src/apps/ciphers.c index fb798a440c..1586dc5383 100644 --- a/src/lib/libssl/src/apps/ciphers.c +++ b/src/lib/libssl/src/apps/ciphers.c | |||
@@ -204,5 +204,5 @@ end: | |||
204 | if (STDout != NULL) | 204 | if (STDout != NULL) |
205 | BIO_free_all(STDout); | 205 | BIO_free_all(STDout); |
206 | apps_shutdown(); | 206 | apps_shutdown(); |
207 | OPENSSL_EXIT(ret); | 207 | return(ret); |
208 | } | 208 | } |
diff --git a/src/lib/libssl/src/apps/crl.c b/src/lib/libssl/src/apps/crl.c index 58c711813f..c89b8818a8 100644 --- a/src/lib/libssl/src/apps/crl.c +++ b/src/lib/libssl/src/apps/crl.c | |||
@@ -385,7 +385,7 @@ end: | |||
385 | X509_STORE_free(store); | 385 | X509_STORE_free(store); |
386 | } | 386 | } |
387 | apps_shutdown(); | 387 | apps_shutdown(); |
388 | OPENSSL_EXIT(ret); | 388 | return(ret); |
389 | } | 389 | } |
390 | 390 | ||
391 | static X509_CRL * | 391 | static X509_CRL * |
diff --git a/src/lib/libssl/src/apps/crl2p7.c b/src/lib/libssl/src/apps/crl2p7.c index bfd2d81e88..ce782742c4 100644 --- a/src/lib/libssl/src/apps/crl2p7.c +++ b/src/lib/libssl/src/apps/crl2p7.c | |||
@@ -262,7 +262,7 @@ end: | |||
262 | X509_CRL_free(crl); | 262 | X509_CRL_free(crl); |
263 | 263 | ||
264 | apps_shutdown(); | 264 | apps_shutdown(); |
265 | OPENSSL_EXIT(ret); | 265 | return(ret); |
266 | } | 266 | } |
267 | 267 | ||
268 | /* | 268 | /* |
diff --git a/src/lib/libssl/src/apps/dgst.c b/src/lib/libssl/src/apps/dgst.c index c024229c58..4a4fa6ff55 100644 --- a/src/lib/libssl/src/apps/dgst.c +++ b/src/lib/libssl/src/apps/dgst.c | |||
@@ -507,7 +507,7 @@ end: | |||
507 | if (bmd != NULL) | 507 | if (bmd != NULL) |
508 | BIO_free(bmd); | 508 | BIO_free(bmd); |
509 | apps_shutdown(); | 509 | apps_shutdown(); |
510 | OPENSSL_EXIT(err); | 510 | exit(err); |
511 | } | 511 | } |
512 | 512 | ||
513 | int | 513 | int |
diff --git a/src/lib/libssl/src/apps/dh.c b/src/lib/libssl/src/apps/dh.c index f362c5aedd..109a6c0d40 100644 --- a/src/lib/libssl/src/apps/dh.c +++ b/src/lib/libssl/src/apps/dh.c | |||
@@ -322,7 +322,7 @@ end: | |||
322 | if (dh != NULL) | 322 | if (dh != NULL) |
323 | DH_free(dh); | 323 | DH_free(dh); |
324 | apps_shutdown(); | 324 | apps_shutdown(); |
325 | OPENSSL_EXIT(ret); | 325 | return(ret); |
326 | } | 326 | } |
327 | #else /* !OPENSSL_NO_DH */ | 327 | #else /* !OPENSSL_NO_DH */ |
328 | 328 | ||
diff --git a/src/lib/libssl/src/apps/dhparam.c b/src/lib/libssl/src/apps/dhparam.c index 9e1b214458..c86d5ef040 100644 --- a/src/lib/libssl/src/apps/dhparam.c +++ b/src/lib/libssl/src/apps/dhparam.c | |||
@@ -253,7 +253,7 @@ bad: | |||
253 | #ifndef OPENSSL_NO_ENGINE | 253 | #ifndef OPENSSL_NO_ENGINE |
254 | BIO_printf(bio_err, " -engine e use engine e, possibly a hardware device.\n"); | 254 | BIO_printf(bio_err, " -engine e use engine e, possibly a hardware device.\n"); |
255 | #endif | 255 | #endif |
256 | BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 256 | BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':'); |
257 | BIO_printf(bio_err, " - load the file (or the files in the directory) into\n"); | 257 | BIO_printf(bio_err, " - load the file (or the files in the directory) into\n"); |
258 | BIO_printf(bio_err, " the random number generator\n"); | 258 | BIO_printf(bio_err, " the random number generator\n"); |
259 | BIO_printf(bio_err, " -noout no output\n"); | 259 | BIO_printf(bio_err, " -noout no output\n"); |
@@ -494,7 +494,7 @@ end: | |||
494 | if (dh != NULL) | 494 | if (dh != NULL) |
495 | DH_free(dh); | 495 | DH_free(dh); |
496 | apps_shutdown(); | 496 | apps_shutdown(); |
497 | OPENSSL_EXIT(ret); | 497 | return(ret); |
498 | } | 498 | } |
499 | 499 | ||
500 | /* dh_cb is identical to dsa_cb in apps/dsaparam.c */ | 500 | /* dh_cb is identical to dsa_cb in apps/dsaparam.c */ |
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c index 3dad04317f..37b9a3ffb0 100644 --- a/src/lib/libssl/src/apps/dsa.c +++ b/src/lib/libssl/src/apps/dsa.c | |||
@@ -350,7 +350,7 @@ end: | |||
350 | if (passout) | 350 | if (passout) |
351 | free(passout); | 351 | free(passout); |
352 | apps_shutdown(); | 352 | apps_shutdown(); |
353 | OPENSSL_EXIT(ret); | 353 | return(ret); |
354 | } | 354 | } |
355 | #else /* !OPENSSL_NO_DSA */ | 355 | #else /* !OPENSSL_NO_DSA */ |
356 | 356 | ||
diff --git a/src/lib/libssl/src/apps/dsaparam.c b/src/lib/libssl/src/apps/dsaparam.c index 81ac16b717..1efa02fbcf 100644 --- a/src/lib/libssl/src/apps/dsaparam.c +++ b/src/lib/libssl/src/apps/dsaparam.c | |||
@@ -420,7 +420,7 @@ end: | |||
420 | if (dsa != NULL) | 420 | if (dsa != NULL) |
421 | DSA_free(dsa); | 421 | DSA_free(dsa); |
422 | apps_shutdown(); | 422 | apps_shutdown(); |
423 | OPENSSL_EXIT(ret); | 423 | return(ret); |
424 | } | 424 | } |
425 | 425 | ||
426 | static int | 426 | static int |
diff --git a/src/lib/libssl/src/apps/ec.c b/src/lib/libssl/src/apps/ec.c index f64608e9c3..8575ba9682 100644 --- a/src/lib/libssl/src/apps/ec.c +++ b/src/lib/libssl/src/apps/ec.c | |||
@@ -353,7 +353,7 @@ end: | |||
353 | if (passout) | 353 | if (passout) |
354 | free(passout); | 354 | free(passout); |
355 | apps_shutdown(); | 355 | apps_shutdown(); |
356 | OPENSSL_EXIT(ret); | 356 | return(ret); |
357 | } | 357 | } |
358 | #else /* !OPENSSL_NO_EC */ | 358 | #else /* !OPENSSL_NO_EC */ |
359 | 359 | ||
diff --git a/src/lib/libssl/src/apps/ecparam.c b/src/lib/libssl/src/apps/ecparam.c index e2b3beee6f..1e7020ca7a 100644 --- a/src/lib/libssl/src/apps/ecparam.c +++ b/src/lib/libssl/src/apps/ecparam.c | |||
@@ -689,7 +689,7 @@ end: | |||
689 | if (group != NULL) | 689 | if (group != NULL) |
690 | EC_GROUP_free(group); | 690 | EC_GROUP_free(group); |
691 | apps_shutdown(); | 691 | apps_shutdown(); |
692 | OPENSSL_EXIT(ret); | 692 | return(ret); |
693 | } | 693 | } |
694 | 694 | ||
695 | static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var, | 695 | static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var, |
diff --git a/src/lib/libssl/src/apps/enc.c b/src/lib/libssl/src/apps/enc.c index 22f431ff1a..11768dbe3a 100644 --- a/src/lib/libssl/src/apps/enc.c +++ b/src/lib/libssl/src/apps/enc.c | |||
@@ -686,7 +686,7 @@ end: | |||
686 | #endif | 686 | #endif |
687 | if(pass) free(pass); | 687 | if(pass) free(pass); |
688 | apps_shutdown(); | 688 | apps_shutdown(); |
689 | OPENSSL_EXIT(ret); | 689 | return(ret); |
690 | } | 690 | } |
691 | 691 | ||
692 | int set_hex(char *in, unsigned char *out, int size) | 692 | int set_hex(char *in, unsigned char *out, int size) |
diff --git a/src/lib/libssl/src/apps/engine.c b/src/lib/libssl/src/apps/engine.c index be07889d60..b9f3121b9f 100644 --- a/src/lib/libssl/src/apps/engine.c +++ b/src/lib/libssl/src/apps/engine.c | |||
@@ -532,7 +532,7 @@ end: | |||
532 | sk_OPENSSL_STRING_pop_free(post_cmds, identity); | 532 | sk_OPENSSL_STRING_pop_free(post_cmds, identity); |
533 | if (bio_out != NULL) BIO_free_all(bio_out); | 533 | if (bio_out != NULL) BIO_free_all(bio_out); |
534 | apps_shutdown(); | 534 | apps_shutdown(); |
535 | OPENSSL_EXIT(ret); | 535 | return(ret); |
536 | } | 536 | } |
537 | #else | 537 | #else |
538 | 538 | ||
diff --git a/src/lib/libssl/src/apps/errstr.c b/src/lib/libssl/src/apps/errstr.c index 00c489be0e..2a26c4ed15 100644 --- a/src/lib/libssl/src/apps/errstr.c +++ b/src/lib/libssl/src/apps/errstr.c | |||
@@ -114,5 +114,5 @@ MAIN(int argc, char **argv) | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | apps_shutdown(); | 116 | apps_shutdown(); |
117 | OPENSSL_EXIT(ret); | 117 | return(ret); |
118 | } | 118 | } |
diff --git a/src/lib/libssl/src/apps/gendh.c b/src/lib/libssl/src/apps/gendh.c index 00c31cf40d..531e37a25b 100644 --- a/src/lib/libssl/src/apps/gendh.c +++ b/src/lib/libssl/src/apps/gendh.c | |||
@@ -151,7 +151,7 @@ bad: | |||
151 | #ifndef OPENSSL_NO_ENGINE | 151 | #ifndef OPENSSL_NO_ENGINE |
152 | BIO_printf(bio_err, " -engine e - use engine e, possibly a hardware device.\n"); | 152 | BIO_printf(bio_err, " -engine e - use engine e, possibly a hardware device.\n"); |
153 | #endif | 153 | #endif |
154 | BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 154 | BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':'); |
155 | BIO_printf(bio_err, " - load the file (or the files in the directory) into\n"); | 155 | BIO_printf(bio_err, " - load the file (or the files in the directory) into\n"); |
156 | BIO_printf(bio_err, " the random number generator\n"); | 156 | BIO_printf(bio_err, " the random number generator\n"); |
157 | goto end; | 157 | goto end; |
@@ -202,7 +202,7 @@ end: | |||
202 | if (dh != NULL) | 202 | if (dh != NULL) |
203 | DH_free(dh); | 203 | DH_free(dh); |
204 | apps_shutdown(); | 204 | apps_shutdown(); |
205 | OPENSSL_EXIT(ret); | 205 | return(ret); |
206 | } | 206 | } |
207 | 207 | ||
208 | static int | 208 | static int |
diff --git a/src/lib/libssl/src/apps/gendsa.c b/src/lib/libssl/src/apps/gendsa.c index 17dbd9d6d3..c4e5415cdc 100644 --- a/src/lib/libssl/src/apps/gendsa.c +++ b/src/lib/libssl/src/apps/gendsa.c | |||
@@ -190,7 +190,7 @@ bad: | |||
190 | #ifndef OPENSSL_NO_ENGINE | 190 | #ifndef OPENSSL_NO_ENGINE |
191 | BIO_printf(bio_err, " -engine e - use engine e, possibly a hardware device.\n"); | 191 | BIO_printf(bio_err, " -engine e - use engine e, possibly a hardware device.\n"); |
192 | #endif | 192 | #endif |
193 | BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 193 | BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':'); |
194 | BIO_printf(bio_err, " - load the file (or the files in the directory) into\n"); | 194 | BIO_printf(bio_err, " - load the file (or the files in the directory) into\n"); |
195 | BIO_printf(bio_err, " the random number generator\n"); | 195 | BIO_printf(bio_err, " the random number generator\n"); |
196 | BIO_printf(bio_err, " dsaparam-file\n"); | 196 | BIO_printf(bio_err, " dsaparam-file\n"); |
@@ -263,7 +263,7 @@ end: | |||
263 | if (passout) | 263 | if (passout) |
264 | free(passout); | 264 | free(passout); |
265 | apps_shutdown(); | 265 | apps_shutdown(); |
266 | OPENSSL_EXIT(ret); | 266 | return(ret); |
267 | } | 267 | } |
268 | #else /* !OPENSSL_NO_DSA */ | 268 | #else /* !OPENSSL_NO_DSA */ |
269 | 269 | ||
diff --git a/src/lib/libssl/src/apps/genrsa.c b/src/lib/libssl/src/apps/genrsa.c index 65e136a8d2..e6e9877cb9 100644 --- a/src/lib/libssl/src/apps/genrsa.c +++ b/src/lib/libssl/src/apps/genrsa.c | |||
@@ -215,7 +215,7 @@ bad: | |||
215 | #ifndef OPENSSL_NO_ENGINE | 215 | #ifndef OPENSSL_NO_ENGINE |
216 | BIO_printf(bio_err, " -engine e use engine e, possibly a hardware device.\n"); | 216 | BIO_printf(bio_err, " -engine e use engine e, possibly a hardware device.\n"); |
217 | #endif | 217 | #endif |
218 | BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 218 | BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':'); |
219 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); | 219 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); |
220 | BIO_printf(bio_err, " the random number generator\n"); | 220 | BIO_printf(bio_err, " the random number generator\n"); |
221 | goto err; | 221 | goto err; |
@@ -296,7 +296,7 @@ err: | |||
296 | if (ret != 0) | 296 | if (ret != 0) |
297 | ERR_print_errors(bio_err); | 297 | ERR_print_errors(bio_err); |
298 | apps_shutdown(); | 298 | apps_shutdown(); |
299 | OPENSSL_EXIT(ret); | 299 | return(ret); |
300 | } | 300 | } |
301 | 301 | ||
302 | static int | 302 | static int |
diff --git a/src/lib/libssl/src/apps/nseq.c b/src/lib/libssl/src/apps/nseq.c index 4abb436f5d..a965f1d703 100644 --- a/src/lib/libssl/src/apps/nseq.c +++ b/src/lib/libssl/src/apps/nseq.c | |||
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv) | |||
102 | BIO_printf (bio_err, "-in file input file\n"); | 102 | BIO_printf (bio_err, "-in file input file\n"); |
103 | BIO_printf (bio_err, "-out file output file\n"); | 103 | BIO_printf (bio_err, "-out file output file\n"); |
104 | BIO_printf (bio_err, "-toseq output NS Sequence file\n"); | 104 | BIO_printf (bio_err, "-toseq output NS Sequence file\n"); |
105 | OPENSSL_EXIT(1); | 105 | exit(1); |
106 | } | 106 | } |
107 | 107 | ||
108 | if (infile) { | 108 | if (infile) { |
@@ -156,6 +156,6 @@ end: | |||
156 | BIO_free_all(out); | 156 | BIO_free_all(out); |
157 | NETSCAPE_CERT_SEQUENCE_free(seq); | 157 | NETSCAPE_CERT_SEQUENCE_free(seq); |
158 | 158 | ||
159 | OPENSSL_EXIT(ret); | 159 | return(ret); |
160 | } | 160 | } |
161 | 161 | ||
diff --git a/src/lib/libssl/src/apps/ocsp.c b/src/lib/libssl/src/apps/ocsp.c index dff47ba41b..170bcac1c3 100644 --- a/src/lib/libssl/src/apps/ocsp.c +++ b/src/lib/libssl/src/apps/ocsp.c | |||
@@ -57,8 +57,6 @@ | |||
57 | */ | 57 | */ |
58 | #ifndef OPENSSL_NO_OCSP | 58 | #ifndef OPENSSL_NO_OCSP |
59 | 59 | ||
60 | #define USE_SOCKETS | ||
61 | |||
62 | #include <stdio.h> | 60 | #include <stdio.h> |
63 | #include <stdlib.h> | 61 | #include <stdlib.h> |
64 | #include <string.h> | 62 | #include <string.h> |
@@ -922,7 +920,7 @@ end: | |||
922 | free(path); | 920 | free(path); |
923 | } | 921 | } |
924 | 922 | ||
925 | OPENSSL_EXIT(ret); | 923 | return(ret); |
926 | } | 924 | } |
927 | 925 | ||
928 | static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_md,X509 *issuer, | 926 | static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_md,X509 *issuer, |
diff --git a/src/lib/libssl/src/apps/openssl.c b/src/lib/libssl/src/apps/openssl.c index fd730ce97e..8f0d11ddd5 100644 --- a/src/lib/libssl/src/apps/openssl.c +++ b/src/lib/libssl/src/apps/openssl.c | |||
@@ -126,7 +126,6 @@ | |||
126 | #ifndef OPENSSL_NO_ENGINE | 126 | #ifndef OPENSSL_NO_ENGINE |
127 | #include <openssl/engine.h> | 127 | #include <openssl/engine.h> |
128 | #endif | 128 | #endif |
129 | #define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */ | ||
130 | #include "progs.h" | 129 | #include "progs.h" |
131 | #include "s_apps.h" | 130 | #include "s_apps.h" |
132 | #include <openssl/err.h> | 131 | #include <openssl/err.h> |
@@ -267,11 +266,11 @@ int main(int Argc, char *ARGV[]) | |||
267 | if (!FIPS_mode_set(1)) { | 266 | if (!FIPS_mode_set(1)) { |
268 | ERR_load_crypto_strings(); | 267 | ERR_load_crypto_strings(); |
269 | ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); | 268 | ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE)); |
270 | EXIT(1); | 269 | exit(1); |
271 | } | 270 | } |
272 | #else | 271 | #else |
273 | fprintf(stderr, "FIPS mode not supported.\n"); | 272 | fprintf(stderr, "FIPS mode not supported.\n"); |
274 | EXIT(1); | 273 | exit(1); |
275 | #endif | 274 | #endif |
276 | } | 275 | } |
277 | 276 | ||
@@ -391,7 +390,7 @@ end: | |||
391 | BIO_free(bio_err); | 390 | BIO_free(bio_err); |
392 | bio_err=NULL; | 391 | bio_err=NULL; |
393 | } | 392 | } |
394 | OPENSSL_EXIT(ret); | 393 | return(ret); |
395 | } | 394 | } |
396 | 395 | ||
397 | #define LIST_STANDARD_COMMANDS "list-standard-commands" | 396 | #define LIST_STANDARD_COMMANDS "list-standard-commands" |
diff --git a/src/lib/libssl/src/apps/passwd.c b/src/lib/libssl/src/apps/passwd.c index b26bdbf4c7..ea62a14487 100644 --- a/src/lib/libssl/src/apps/passwd.c +++ b/src/lib/libssl/src/apps/passwd.c | |||
@@ -286,7 +286,7 @@ err: | |||
286 | if (out) | 286 | if (out) |
287 | BIO_free_all(out); | 287 | BIO_free_all(out); |
288 | apps_shutdown(); | 288 | apps_shutdown(); |
289 | OPENSSL_EXIT(ret); | 289 | return(ret); |
290 | } | 290 | } |
291 | 291 | ||
292 | 292 | ||
@@ -497,6 +497,6 @@ err: | |||
497 | int MAIN(int argc, char **argv) | 497 | int MAIN(int argc, char **argv) |
498 | { | 498 | { |
499 | fputs("Program not available.\n", stderr) | 499 | fputs("Program not available.\n", stderr) |
500 | OPENSSL_EXIT(1); | 500 | exit(1); |
501 | } | 501 | } |
502 | #endif | 502 | #endif |
diff --git a/src/lib/libssl/src/apps/pkcs12.c b/src/lib/libssl/src/apps/pkcs12.c index 9794718675..74d063ef5e 100644 --- a/src/lib/libssl/src/apps/pkcs12.c +++ b/src/lib/libssl/src/apps/pkcs12.c | |||
@@ -335,7 +335,7 @@ int MAIN(int argc, char **argv) | |||
335 | #ifndef OPENSSL_NO_ENGINE | 335 | #ifndef OPENSSL_NO_ENGINE |
336 | BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n"); | 336 | BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n"); |
337 | #endif | 337 | #endif |
338 | BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 338 | BIO_printf(bio_err, "-rand file%cfile%c...\n", ':', ':'); |
339 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); | 339 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); |
340 | BIO_printf(bio_err, " the random number generator\n"); | 340 | BIO_printf(bio_err, " the random number generator\n"); |
341 | BIO_printf(bio_err, "-CSP name Microsoft CSP name\n"); | 341 | BIO_printf(bio_err, "-CSP name Microsoft CSP name\n"); |
@@ -692,7 +692,7 @@ int MAIN(int argc, char **argv) | |||
692 | if(passin) free(passin); | 692 | if(passin) free(passin); |
693 | if(passout) free(passout); | 693 | if(passout) free(passout); |
694 | apps_shutdown(); | 694 | apps_shutdown(); |
695 | OPENSSL_EXIT(ret); | 695 | exit(ret); |
696 | } | 696 | } |
697 | 697 | ||
698 | int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, | 698 | int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass, |
diff --git a/src/lib/libssl/src/apps/pkcs7.c b/src/lib/libssl/src/apps/pkcs7.c index 272bf11f24..8a0e878e49 100644 --- a/src/lib/libssl/src/apps/pkcs7.c +++ b/src/lib/libssl/src/apps/pkcs7.c | |||
@@ -310,5 +310,5 @@ end: | |||
310 | if (in != NULL) BIO_free(in); | 310 | if (in != NULL) BIO_free(in); |
311 | if (out != NULL) BIO_free_all(out); | 311 | if (out != NULL) BIO_free_all(out); |
312 | apps_shutdown(); | 312 | apps_shutdown(); |
313 | OPENSSL_EXIT(ret); | 313 | return(ret); |
314 | } | 314 | } |
diff --git a/src/lib/libssl/src/apps/rand.c b/src/lib/libssl/src/apps/rand.c index 884c244486..c01df530ae 100644 --- a/src/lib/libssl/src/apps/rand.c +++ b/src/lib/libssl/src/apps/rand.c | |||
@@ -168,7 +168,7 @@ int MAIN(int argc, char **argv) | |||
168 | #ifndef OPENSSL_NO_ENGINE | 168 | #ifndef OPENSSL_NO_ENGINE |
169 | BIO_printf(bio_err, "-engine e - use engine e, possibly a hardware device.\n"); | 169 | BIO_printf(bio_err, "-engine e - use engine e, possibly a hardware device.\n"); |
170 | #endif | 170 | #endif |
171 | BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 171 | BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", ':', ':'); |
172 | BIO_printf(bio_err, "-base64 - base64 encode output\n"); | 172 | BIO_printf(bio_err, "-base64 - base64 encode output\n"); |
173 | BIO_printf(bio_err, "-hex - hex encode output\n"); | 173 | BIO_printf(bio_err, "-hex - hex encode output\n"); |
174 | goto err; | 174 | goto err; |
@@ -235,5 +235,5 @@ err: | |||
235 | if (out) | 235 | if (out) |
236 | BIO_free_all(out); | 236 | BIO_free_all(out); |
237 | apps_shutdown(); | 237 | apps_shutdown(); |
238 | OPENSSL_EXIT(ret); | 238 | return(ret); |
239 | } | 239 | } |
diff --git a/src/lib/libssl/src/apps/req.c b/src/lib/libssl/src/apps/req.c index 3374626e63..22302c5c30 100644 --- a/src/lib/libssl/src/apps/req.c +++ b/src/lib/libssl/src/apps/req.c | |||
@@ -422,7 +422,7 @@ bad: | |||
422 | BIO_printf(bio_err," -key file use the private key contained in file\n"); | 422 | BIO_printf(bio_err," -key file use the private key contained in file\n"); |
423 | BIO_printf(bio_err," -keyform arg key file format\n"); | 423 | BIO_printf(bio_err," -keyform arg key file format\n"); |
424 | BIO_printf(bio_err," -keyout arg file to send the key to\n"); | 424 | BIO_printf(bio_err," -keyout arg file to send the key to\n"); |
425 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 425 | BIO_printf(bio_err," -rand file%cfile%c...\n", ':', ':'); |
426 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); | 426 | BIO_printf(bio_err," load the file (or the files in the directory) into\n"); |
427 | BIO_printf(bio_err," the random number generator\n"); | 427 | BIO_printf(bio_err," the random number generator\n"); |
428 | BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); | 428 | BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n"); |
@@ -1097,7 +1097,7 @@ end: | |||
1097 | if(passargout && passout) free(passout); | 1097 | if(passargout && passout) free(passout); |
1098 | OBJ_cleanup(); | 1098 | OBJ_cleanup(); |
1099 | apps_shutdown(); | 1099 | apps_shutdown(); |
1100 | OPENSSL_EXIT(ex); | 1100 | exit(ex); |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn, | 1103 | static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn, |
diff --git a/src/lib/libssl/src/apps/rsa.c b/src/lib/libssl/src/apps/rsa.c index 6352267671..b367f23551 100644 --- a/src/lib/libssl/src/apps/rsa.c +++ b/src/lib/libssl/src/apps/rsa.c | |||
@@ -433,7 +433,7 @@ end: | |||
433 | if(passin) free(passin); | 433 | if(passin) free(passin); |
434 | if(passout) free(passout); | 434 | if(passout) free(passout); |
435 | apps_shutdown(); | 435 | apps_shutdown(); |
436 | OPENSSL_EXIT(ret); | 436 | return(ret); |
437 | } | 437 | } |
438 | #else /* !OPENSSL_NO_RSA */ | 438 | #else /* !OPENSSL_NO_RSA */ |
439 | 439 | ||
diff --git a/src/lib/libssl/src/apps/s_cb.c b/src/lib/libssl/src/apps/s_cb.c index 6c341d924c..b5dc40c53a 100644 --- a/src/lib/libssl/src/apps/s_cb.c +++ b/src/lib/libssl/src/apps/s_cb.c | |||
@@ -111,11 +111,13 @@ | |||
111 | 111 | ||
112 | #include <stdio.h> | 112 | #include <stdio.h> |
113 | #include <stdlib.h> | 113 | #include <stdlib.h> |
114 | #define USE_SOCKETS | 114 | #include <netdb.h> |
115 | #include <sys/socket.h> | ||
116 | #include <netinet/in.h> | ||
117 | |||
115 | #define NON_MAIN | 118 | #define NON_MAIN |
116 | #include "apps.h" | 119 | #include "apps.h" |
117 | #undef NON_MAIN | 120 | #undef NON_MAIN |
118 | #undef USE_SOCKETS | ||
119 | #include <openssl/err.h> | 121 | #include <openssl/err.h> |
120 | #include <openssl/rand.h> | 122 | #include <openssl/rand.h> |
121 | #include <openssl/x509.h> | 123 | #include <openssl/x509.h> |
diff --git a/src/lib/libssl/src/apps/s_client.c b/src/lib/libssl/src/apps/s_client.c index a163ac9904..0b300a574d 100644 --- a/src/lib/libssl/src/apps/s_client.c +++ b/src/lib/libssl/src/apps/s_client.c | |||
@@ -141,13 +141,16 @@ | |||
141 | #include <ctype.h> | 141 | #include <ctype.h> |
142 | #include <stdio.h> | 142 | #include <stdio.h> |
143 | #include <stdlib.h> | 143 | #include <stdlib.h> |
144 | #include <limits.h> | ||
144 | #include <string.h> | 145 | #include <string.h> |
145 | #include <openssl/e_os2.h> | 146 | #include <openssl/e_os2.h> |
147 | #include <netdb.h> | ||
148 | #include <sys/socket.h> | ||
149 | #include <netinet/in.h> | ||
146 | #ifdef OPENSSL_NO_STDIO | 150 | #ifdef OPENSSL_NO_STDIO |
147 | #define APPS_WIN16 | 151 | #define APPS_WIN16 |
148 | #endif | 152 | #endif |
149 | 153 | ||
150 | #define USE_SOCKETS | ||
151 | #include "apps.h" | 154 | #include "apps.h" |
152 | #include <openssl/x509.h> | 155 | #include <openssl/x509.h> |
153 | #include <openssl/ssl.h> | 156 | #include <openssl/ssl.h> |
@@ -338,7 +341,7 @@ static void sc_usage(void) | |||
338 | #ifndef OPENSSL_NO_ENGINE | 341 | #ifndef OPENSSL_NO_ENGINE |
339 | BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); | 342 | BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); |
340 | #endif | 343 | #endif |
341 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 344 | BIO_printf(bio_err," -rand file%cfile%c...\n", ':', ':'); |
342 | BIO_printf(bio_err," -sess_out arg - file to write SSL session to\n"); | 345 | BIO_printf(bio_err," -sess_out arg - file to write SSL session to\n"); |
343 | BIO_printf(bio_err," -sess_in arg - file to read SSL session from\n"); | 346 | BIO_printf(bio_err," -sess_in arg - file to read SSL session from\n"); |
344 | #ifndef OPENSSL_NO_TLSEXT | 347 | #ifndef OPENSSL_NO_TLSEXT |
@@ -1862,7 +1865,7 @@ end: | |||
1862 | bio_c_out=NULL; | 1865 | bio_c_out=NULL; |
1863 | } | 1866 | } |
1864 | apps_shutdown(); | 1867 | apps_shutdown(); |
1865 | OPENSSL_EXIT(ret); | 1868 | return(ret); |
1866 | } | 1869 | } |
1867 | 1870 | ||
1868 | 1871 | ||
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c index 1a2b9804ef..1396992739 100644 --- a/src/lib/libssl/src/apps/s_server.c +++ b/src/lib/libssl/src/apps/s_server.c | |||
@@ -151,6 +151,7 @@ | |||
151 | #include <stdio.h> | 151 | #include <stdio.h> |
152 | #include <stdlib.h> | 152 | #include <stdlib.h> |
153 | #include <string.h> | 153 | #include <string.h> |
154 | #include <sys/socket.h> | ||
154 | 155 | ||
155 | #include <openssl/e_os2.h> | 156 | #include <openssl/e_os2.h> |
156 | #ifdef OPENSSL_NO_STDIO | 157 | #ifdef OPENSSL_NO_STDIO |
@@ -161,7 +162,6 @@ | |||
161 | 162 | ||
162 | #include <openssl/lhash.h> | 163 | #include <openssl/lhash.h> |
163 | #include <openssl/bn.h> | 164 | #include <openssl/bn.h> |
164 | #define USE_SOCKETS | ||
165 | #include "apps.h" | 165 | #include "apps.h" |
166 | #include <openssl/err.h> | 166 | #include <openssl/err.h> |
167 | #include <openssl/pem.h> | 167 | #include <openssl/pem.h> |
@@ -523,7 +523,7 @@ static void sv_usage(void) | |||
523 | BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); | 523 | BIO_printf(bio_err," -engine id - Initialise and use the specified engine\n"); |
524 | #endif | 524 | #endif |
525 | BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n"); | 525 | BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n"); |
526 | BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 526 | BIO_printf(bio_err," -rand file%cfile%c...\n", ':', ':'); |
527 | #ifndef OPENSSL_NO_TLSEXT | 527 | #ifndef OPENSSL_NO_TLSEXT |
528 | BIO_printf(bio_err," -servername host - servername for HostName TLS extension\n"); | 528 | BIO_printf(bio_err," -servername host - servername for HostName TLS extension\n"); |
529 | BIO_printf(bio_err," -servername_fatal - on mismatch send fatal alert (default warning alert)\n"); | 529 | BIO_printf(bio_err," -servername_fatal - on mismatch send fatal alert (default warning alert)\n"); |
@@ -1744,7 +1744,7 @@ end: | |||
1744 | bio_s_out=NULL; | 1744 | bio_s_out=NULL; |
1745 | } | 1745 | } |
1746 | apps_shutdown(); | 1746 | apps_shutdown(); |
1747 | OPENSSL_EXIT(ret); | 1747 | return(ret); |
1748 | } | 1748 | } |
1749 | 1749 | ||
1750 | static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) | 1750 | static void print_stats(BIO *bio, SSL_CTX *ssl_ctx) |
diff --git a/src/lib/libssl/src/apps/s_socket.c b/src/lib/libssl/src/apps/s_socket.c index a0dabcac65..097c900bd7 100644 --- a/src/lib/libssl/src/apps/s_socket.c +++ b/src/lib/libssl/src/apps/s_socket.c | |||
@@ -61,6 +61,9 @@ | |||
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include <errno.h> | 62 | #include <errno.h> |
63 | #include <signal.h> | 63 | #include <signal.h> |
64 | #include <netdb.h> | ||
65 | #include <sys/socket.h> | ||
66 | #include <netinet/in.h> | ||
64 | 67 | ||
65 | #ifdef FLAT_INC | 68 | #ifdef FLAT_INC |
66 | #include "e_os2.h" | 69 | #include "e_os2.h" |
@@ -68,10 +71,8 @@ | |||
68 | #include "../e_os2.h" | 71 | #include "../e_os2.h" |
69 | #endif | 72 | #endif |
70 | 73 | ||
71 | #define USE_SOCKETS | ||
72 | #define NON_MAIN | 74 | #define NON_MAIN |
73 | #include "apps.h" | 75 | #include "apps.h" |
74 | #undef USE_SOCKETS | ||
75 | #undef NON_MAIN | 76 | #undef NON_MAIN |
76 | #include "s_apps.h" | 77 | #include "s_apps.h" |
77 | #include <openssl/ssl.h> | 78 | #include <openssl/ssl.h> |
diff --git a/src/lib/libssl/src/apps/s_time.c b/src/lib/libssl/src/apps/s_time.c index 1eb01f6d2f..ee5f7c633e 100644 --- a/src/lib/libssl/src/apps/s_time.c +++ b/src/lib/libssl/src/apps/s_time.c | |||
@@ -66,8 +66,8 @@ | |||
66 | #include <stdio.h> | 66 | #include <stdio.h> |
67 | #include <stdlib.h> | 67 | #include <stdlib.h> |
68 | #include <string.h> | 68 | #include <string.h> |
69 | #include <sys/socket.h> | ||
69 | 70 | ||
70 | #define USE_SOCKETS | ||
71 | #include "apps.h" | 71 | #include "apps.h" |
72 | #ifdef OPENSSL_NO_STDIO | 72 | #ifdef OPENSSL_NO_STDIO |
73 | #define APPS_WIN16 | 73 | #define APPS_WIN16 |
@@ -533,7 +533,7 @@ end: | |||
533 | tm_ctx=NULL; | 533 | tm_ctx=NULL; |
534 | } | 534 | } |
535 | apps_shutdown(); | 535 | apps_shutdown(); |
536 | OPENSSL_EXIT(ret); | 536 | return(ret); |
537 | } | 537 | } |
538 | 538 | ||
539 | /*********************************************************************** | 539 | /*********************************************************************** |
diff --git a/src/lib/libssl/src/apps/sess_id.c b/src/lib/libssl/src/apps/sess_id.c index 8fab8c0b9a..5ad1bddedb 100644 --- a/src/lib/libssl/src/apps/sess_id.c +++ b/src/lib/libssl/src/apps/sess_id.c | |||
@@ -269,7 +269,7 @@ end: | |||
269 | if (out != NULL) BIO_free_all(out); | 269 | if (out != NULL) BIO_free_all(out); |
270 | if (x != NULL) SSL_SESSION_free(x); | 270 | if (x != NULL) SSL_SESSION_free(x); |
271 | apps_shutdown(); | 271 | apps_shutdown(); |
272 | OPENSSL_EXIT(ret); | 272 | return(ret); |
273 | } | 273 | } |
274 | 274 | ||
275 | static SSL_SESSION *load_sess_id(char *infile, int format) | 275 | static SSL_SESSION *load_sess_id(char *infile, int format) |
diff --git a/src/lib/libssl/src/apps/smime.c b/src/lib/libssl/src/apps/smime.c index 4421e948bb..c4b976fa00 100644 --- a/src/lib/libssl/src/apps/smime.c +++ b/src/lib/libssl/src/apps/smime.c | |||
@@ -485,7 +485,7 @@ int MAIN(int argc, char **argv) | |||
485 | BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n"); | 485 | BIO_printf (bio_err, "-engine e use engine e, possibly a hardware device.\n"); |
486 | #endif | 486 | #endif |
487 | BIO_printf (bio_err, "-passin arg input file pass phrase source\n"); | 487 | BIO_printf (bio_err, "-passin arg input file pass phrase source\n"); |
488 | BIO_printf(bio_err, "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 488 | BIO_printf(bio_err, "-rand file%cfile%c...\n", ':', ':'); |
489 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); | 489 | BIO_printf(bio_err, " load the file (or the files in the directory) into\n"); |
490 | BIO_printf(bio_err, " the random number generator\n"); | 490 | BIO_printf(bio_err, " the random number generator\n"); |
491 | BIO_printf (bio_err, "cert.pem recipient certificate(s) for encryption\n"); | 491 | BIO_printf (bio_err, "cert.pem recipient certificate(s) for encryption\n"); |
diff --git a/src/lib/libssl/src/apps/speed.c b/src/lib/libssl/src/apps/speed.c index acae09e95e..59f28e4d58 100644 --- a/src/lib/libssl/src/apps/speed.c +++ b/src/lib/libssl/src/apps/speed.c | |||
@@ -2522,7 +2522,7 @@ end: | |||
2522 | #endif | 2522 | #endif |
2523 | 2523 | ||
2524 | apps_shutdown(); | 2524 | apps_shutdown(); |
2525 | OPENSSL_EXIT(mret); | 2525 | exit(mret); |
2526 | } | 2526 | } |
2527 | 2527 | ||
2528 | static void print_message(const char *s, long num, int length) | 2528 | static void print_message(const char *s, long num, int length) |
diff --git a/src/lib/libssl/src/apps/spkac.c b/src/lib/libssl/src/apps/spkac.c index 8d29dce907..3caf5c04bd 100644 --- a/src/lib/libssl/src/apps/spkac.c +++ b/src/lib/libssl/src/apps/spkac.c | |||
@@ -292,5 +292,5 @@ end: | |||
292 | EVP_PKEY_free(pkey); | 292 | EVP_PKEY_free(pkey); |
293 | if(passin) free(passin); | 293 | if(passin) free(passin); |
294 | apps_shutdown(); | 294 | apps_shutdown(); |
295 | OPENSSL_EXIT(ret); | 295 | return(ret); |
296 | } | 296 | } |
diff --git a/src/lib/libssl/src/apps/srp.c b/src/lib/libssl/src/apps/srp.c index 15f3315c18..2ce1d40831 100644 --- a/src/lib/libssl/src/apps/srp.c +++ b/src/lib/libssl/src/apps/srp.c | |||
@@ -741,7 +741,7 @@ err: | |||
741 | 741 | ||
742 | OBJ_cleanup(); | 742 | OBJ_cleanup(); |
743 | apps_shutdown(); | 743 | apps_shutdown(); |
744 | OPENSSL_EXIT(ret); | 744 | return(ret); |
745 | } | 745 | } |
746 | 746 | ||
747 | 747 | ||
diff --git a/src/lib/libssl/src/apps/ts.c b/src/lib/libssl/src/apps/ts.c index 9528631e92..799c5b3532 100644 --- a/src/lib/libssl/src/apps/ts.c +++ b/src/lib/libssl/src/apps/ts.c | |||
@@ -371,7 +371,7 @@ int MAIN(int argc, char **argv) | |||
371 | "[-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] " | 371 | "[-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] " |
372 | "[-policy object_id] [-no_nonce] [-cert] " | 372 | "[-policy object_id] [-no_nonce] [-cert] " |
373 | "[-in request.tsq] [-out request.tsq] [-text]\n", | 373 | "[-in request.tsq] [-out request.tsq] [-text]\n", |
374 | LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR); | 374 | ':', ':'); |
375 | BIO_printf(bio_err, "or\n" | 375 | BIO_printf(bio_err, "or\n" |
376 | "ts -reply [-config configfile] [-section tsa_section] " | 376 | "ts -reply [-config configfile] [-section tsa_section] " |
377 | "[-queryfile request.tsq] [-passin password] " | 377 | "[-queryfile request.tsq] [-passin password] " |
@@ -397,7 +397,7 @@ int MAIN(int argc, char **argv) | |||
397 | bio_err = NULL; | 397 | bio_err = NULL; |
398 | } | 398 | } |
399 | 399 | ||
400 | OPENSSL_EXIT(ret); | 400 | return(ret); |
401 | } | 401 | } |
402 | 402 | ||
403 | /* | 403 | /* |
diff --git a/src/lib/libssl/src/apps/verify.c b/src/lib/libssl/src/apps/verify.c index ea1a2e6fd9..135d76d667 100644 --- a/src/lib/libssl/src/apps/verify.c +++ b/src/lib/libssl/src/apps/verify.c | |||
@@ -260,7 +260,7 @@ end: | |||
260 | sk_X509_pop_free(trusted, X509_free); | 260 | sk_X509_pop_free(trusted, X509_free); |
261 | sk_X509_CRL_pop_free(crls, X509_CRL_free); | 261 | sk_X509_CRL_pop_free(crls, X509_CRL_free); |
262 | apps_shutdown(); | 262 | apps_shutdown(); |
263 | OPENSSL_EXIT(ret < 0 ? 2 : ret); | 263 | exit(ret < 0 ? 2 : ret); |
264 | } | 264 | } |
265 | 265 | ||
266 | static int check(X509_STORE *ctx, char *file, | 266 | static int check(X509_STORE *ctx, char *file, |
diff --git a/src/lib/libssl/src/apps/version.c b/src/lib/libssl/src/apps/version.c index e9555cbde2..811ac26fc1 100644 --- a/src/lib/libssl/src/apps/version.c +++ b/src/lib/libssl/src/apps/version.c | |||
@@ -213,5 +213,5 @@ int MAIN(int argc, char **argv) | |||
213 | if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR)); | 213 | if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR)); |
214 | end: | 214 | end: |
215 | apps_shutdown(); | 215 | apps_shutdown(); |
216 | OPENSSL_EXIT(ret); | 216 | return(ret); |
217 | } | 217 | } |
diff --git a/src/lib/libssl/src/apps/x509.c b/src/lib/libssl/src/apps/x509.c index 4e5ce37750..0026793a43 100644 --- a/src/lib/libssl/src/apps/x509.c +++ b/src/lib/libssl/src/apps/x509.c | |||
@@ -1089,7 +1089,7 @@ end: | |||
1089 | sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free); | 1089 | sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free); |
1090 | if (passin) free(passin); | 1090 | if (passin) free(passin); |
1091 | apps_shutdown(); | 1091 | apps_shutdown(); |
1092 | OPENSSL_EXIT(ret); | 1092 | return(ret); |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create) | 1095 | static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create) |
diff --git a/src/lib/libssl/src/crypto/bio/b_sock.c b/src/lib/libssl/src/crypto/bio/b_sock.c index 1ae9d96577..0972feeb58 100644 --- a/src/lib/libssl/src/crypto/bio/b_sock.c +++ b/src/lib/libssl/src/crypto/bio/b_sock.c | |||
@@ -59,16 +59,13 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <errno.h> | 61 | #include <errno.h> |
62 | #define USE_SOCKETS | ||
63 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
64 | #include <openssl/bio.h> | 63 | #include <openssl/bio.h> |
65 | #if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK) | ||
66 | #include <netdb.h> | ||
67 | #if defined(NETWARE_CLIB) | ||
68 | #include <sys/ioctl.h> | 64 | #include <sys/ioctl.h> |
69 | NETDB_DEFINE_CONTEXT | 65 | |
70 | #endif | 66 | #include <netdb.h> |
71 | #endif | 67 | #include <sys/socket.h> |
68 | #include <netinet/in.h> | ||
72 | 69 | ||
73 | #ifndef OPENSSL_NO_SOCK | 70 | #ifndef OPENSSL_NO_SOCK |
74 | 71 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_acpt.c b/src/lib/libssl/src/crypto/bio/bss_acpt.c index a272ada366..27a4d371dc 100644 --- a/src/lib/libssl/src/crypto/bio/bss_acpt.c +++ b/src/lib/libssl/src/crypto/bio/bss_acpt.c | |||
@@ -58,9 +58,9 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
63 | #include <sys/socket.h> | ||
64 | 64 | ||
65 | #ifndef OPENSSL_NO_SOCK | 65 | #ifndef OPENSSL_NO_SOCK |
66 | 66 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_conn.c b/src/lib/libssl/src/crypto/bio/bss_conn.c index 9c5320cafb..46667bc7d6 100644 --- a/src/lib/libssl/src/crypto/bio/bss_conn.c +++ b/src/lib/libssl/src/crypto/bio/bss_conn.c | |||
@@ -58,9 +58,11 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | #include <openssl/bio.h> | 62 | #include <openssl/bio.h> |
63 | #include <netdb.h> | ||
64 | #include <sys/socket.h> | ||
65 | #include <netinet/in.h> | ||
64 | 66 | ||
65 | #ifndef OPENSSL_NO_SOCK | 67 | #ifndef OPENSSL_NO_SOCK |
66 | 68 | ||
diff --git a/src/lib/libssl/src/crypto/bio/bss_dgram.c b/src/lib/libssl/src/crypto/bio/bss_dgram.c index 4c54601abc..50281b5650 100644 --- a/src/lib/libssl/src/crypto/bio/bss_dgram.c +++ b/src/lib/libssl/src/crypto/bio/bss_dgram.c | |||
@@ -60,10 +60,12 @@ | |||
60 | 60 | ||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include <errno.h> | 62 | #include <errno.h> |
63 | #define USE_SOCKETS | ||
64 | #include "cryptlib.h" | 63 | #include "cryptlib.h" |
65 | |||
66 | #include <openssl/bio.h> | 64 | #include <openssl/bio.h> |
65 | #include <netdb.h> | ||
66 | #include <sys/socket.h> | ||
67 | #include <netinet/in.h> | ||
68 | |||
67 | #ifndef OPENSSL_NO_DGRAM | 69 | #ifndef OPENSSL_NO_DGRAM |
68 | 70 | ||
69 | #ifndef OPENSSL_NO_SCTP | 71 | #ifndef OPENSSL_NO_SCTP |
diff --git a/src/lib/libssl/src/crypto/bio/bss_fd.c b/src/lib/libssl/src/crypto/bio/bss_fd.c index 4369d6411d..b84719c487 100644 --- a/src/lib/libssl/src/crypto/bio/bss_fd.c +++ b/src/lib/libssl/src/crypto/bio/bss_fd.c | |||
@@ -58,7 +58,6 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
63 | 62 | ||
64 | #if defined(OPENSSL_NO_POSIX_IO) | 63 | #if defined(OPENSSL_NO_POSIX_IO) |
diff --git a/src/lib/libssl/src/crypto/bio/bss_sock.c b/src/lib/libssl/src/crypto/bio/bss_sock.c index 5335495c6e..7c499634fb 100644 --- a/src/lib/libssl/src/crypto/bio/bss_sock.c +++ b/src/lib/libssl/src/crypto/bio/bss_sock.c | |||
@@ -58,8 +58,8 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <errno.h> | 60 | #include <errno.h> |
61 | #define USE_SOCKETS | ||
62 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <sys/socket.h> | ||
63 | 63 | ||
64 | #ifndef OPENSSL_NO_SOCK | 64 | #ifndef OPENSSL_NO_SOCK |
65 | 65 | ||
diff --git a/src/lib/libssl/src/crypto/x509/by_dir.c b/src/lib/libssl/src/crypto/x509/by_dir.c index 76f8244f36..bc60331275 100644 --- a/src/lib/libssl/src/crypto/x509/by_dir.c +++ b/src/lib/libssl/src/crypto/x509/by_dir.c | |||
@@ -218,7 +218,7 @@ add_cert_dir(BY_DIR *ctx, const char *dir, int type) | |||
218 | s = dir; | 218 | s = dir; |
219 | p = s; | 219 | p = s; |
220 | do { | 220 | do { |
221 | if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) { | 221 | if ((*p == ':') || (*p == '\0')) { |
222 | BY_DIR_ENTRY *ent; | 222 | BY_DIR_ENTRY *ent; |
223 | ss = s; | 223 | ss = s; |
224 | s = p + 1; | 224 | s = p + 1; |
diff --git a/src/lib/libssl/src/e_os.h b/src/lib/libssl/src/e_os.h index b9278c9e7e..e66179273f 100644 --- a/src/lib/libssl/src/e_os.h +++ b/src/lib/libssl/src/e_os.h | |||
@@ -61,10 +61,14 @@ | |||
61 | 61 | ||
62 | #include <openssl/opensslconf.h> | 62 | #include <openssl/opensslconf.h> |
63 | 63 | ||
64 | /* | ||
65 | * <openssl/e_os2.h> contains what we can justify to make visible | ||
66 | * to the outside | ||
67 | * <openssl/e_os2.h> is not exported interface (except to the openssl | ||
68 | * command) | ||
69 | */ | ||
70 | |||
64 | #include <openssl/e_os2.h> | 71 | #include <openssl/e_os2.h> |
65 | /* <openssl/e_os2.h> contains what we can justify to make visible | ||
66 | * to the outside; this file e_os.h is not part of the exported | ||
67 | * interface. */ | ||
68 | 72 | ||
69 | #ifdef __cplusplus | 73 | #ifdef __cplusplus |
70 | extern "C" { | 74 | extern "C" { |
@@ -76,44 +80,10 @@ extern "C" { | |||
76 | #define REF_PRINT(a,b) fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->references,a) | 80 | #define REF_PRINT(a,b) fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->references,a) |
77 | #endif | 81 | #endif |
78 | 82 | ||
79 | # include <unistd.h> | 83 | #define OPENSSL_CONF "openssl.cnf" |
80 | # include <sys/types.h> | 84 | #define RFILE ".rnd" |
81 | # define OPENSSL_CONF "openssl.cnf" | ||
82 | # define SSLEAY_CONF OPENSSL_CONF | ||
83 | # define RFILE ".rnd" | ||
84 | # define LIST_SEPARATOR_CHAR ':' | ||
85 | # define EXIT(n) exit(n) | ||
86 | |||
87 | |||
88 | #ifdef USE_SOCKETS | ||
89 | # include <sys/param.h> | ||
90 | # include <sys/time.h> /* Needed under linux for FD_XXX */ | ||
91 | # include <netdb.h> | ||
92 | # include <sys/socket.h> | ||
93 | # include <netinet/in.h> | ||
94 | # include <sys/ioctl.h> | ||
95 | #endif | ||
96 | |||
97 | /* Some IPv6 implementations are broken, disable them in known bad | ||
98 | * versions. | ||
99 | */ | ||
100 | # if !defined(OPENSSL_USE_IPV6) | ||
101 | # if defined(AF_INET6) | ||
102 | # define OPENSSL_USE_IPV6 1 | ||
103 | # else | ||
104 | # define OPENSSL_USE_IPV6 0 | ||
105 | # endif | ||
106 | # endif | ||
107 | |||
108 | #ifndef OPENSSL_EXIT | ||
109 | # if defined(MONOLITH) && !defined(OPENSSL_C) | ||
110 | # define OPENSSL_EXIT(n) return(n) | ||
111 | # else | ||
112 | # define OPENSSL_EXIT(n) do { EXIT(n); return(n); } while(0) | ||
113 | # endif | ||
114 | #endif | ||
115 | 85 | ||
116 | /***********************************************/ | 86 | #define OPENSSL_USE_IPV6 1 |
117 | 87 | ||
118 | #ifdef __cplusplus | 88 | #ifdef __cplusplus |
119 | } | 89 | } |
diff --git a/src/lib/libssl/src/ssl/s3_pkt.c b/src/lib/libssl/src/ssl/s3_pkt.c index c9a7b6cf07..d6c8756a1a 100644 --- a/src/lib/libssl/src/ssl/s3_pkt.c +++ b/src/lib/libssl/src/ssl/s3_pkt.c | |||
@@ -111,7 +111,6 @@ | |||
111 | 111 | ||
112 | #include <stdio.h> | 112 | #include <stdio.h> |
113 | #include <errno.h> | 113 | #include <errno.h> |
114 | #define USE_SOCKETS | ||
115 | #include "ssl_locl.h" | 114 | #include "ssl_locl.h" |
116 | #include <openssl/evp.h> | 115 | #include <openssl/evp.h> |
117 | #include <openssl/buffer.h> | 116 | #include <openssl/buffer.h> |