Mostly gut e_os.h:
authorderaadt <deraadt@openbsd.org>
Thu, 17 Apr 2014 20:58:07 +0000 (20:58 +0000)
committerderaadt <deraadt@openbsd.org>
Thu, 17 Apr 2014 20:58:07 +0000 (20:58 +0000)
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:
lib/libcrypto/bio/b_sock.c
lib/libcrypto/bio/bss_acpt.c
lib/libcrypto/bio/bss_conn.c
lib/libcrypto/bio/bss_dgram.c
lib/libcrypto/bio/bss_fd.c
lib/libcrypto/bio/bss_sock.c
lib/libcrypto/x509/by_dir.c
lib/libssl/s3_pkt.c
lib/libssl/src/apps/app_rand.c
lib/libssl/src/apps/asn1pars.c
lib/libssl/src/apps/ca.c
lib/libssl/src/apps/ciphers.c
lib/libssl/src/apps/crl.c
lib/libssl/src/apps/crl2p7.c
lib/libssl/src/apps/dgst.c
lib/libssl/src/apps/dh.c
lib/libssl/src/apps/dhparam.c
lib/libssl/src/apps/dsa.c
lib/libssl/src/apps/dsaparam.c
lib/libssl/src/apps/ec.c
lib/libssl/src/apps/ecparam.c
lib/libssl/src/apps/enc.c
lib/libssl/src/apps/engine.c
lib/libssl/src/apps/errstr.c
lib/libssl/src/apps/gendh.c
lib/libssl/src/apps/gendsa.c
lib/libssl/src/apps/genrsa.c
lib/libssl/src/apps/nseq.c
lib/libssl/src/apps/ocsp.c
lib/libssl/src/apps/openssl.c
lib/libssl/src/apps/passwd.c
lib/libssl/src/apps/pkcs12.c
lib/libssl/src/apps/pkcs7.c
lib/libssl/src/apps/rand.c
lib/libssl/src/apps/req.c
lib/libssl/src/apps/rsa.c
lib/libssl/src/apps/s_cb.c
lib/libssl/src/apps/s_client.c
lib/libssl/src/apps/s_server.c
lib/libssl/src/apps/s_socket.c
lib/libssl/src/apps/s_time.c
lib/libssl/src/apps/sess_id.c
lib/libssl/src/apps/smime.c
lib/libssl/src/apps/speed.c
lib/libssl/src/apps/spkac.c
lib/libssl/src/apps/srp.c
lib/libssl/src/apps/ts.c
lib/libssl/src/apps/verify.c
lib/libssl/src/apps/version.c
lib/libssl/src/apps/x509.c
lib/libssl/src/crypto/bio/b_sock.c
lib/libssl/src/crypto/bio/bss_acpt.c
lib/libssl/src/crypto/bio/bss_conn.c
lib/libssl/src/crypto/bio/bss_dgram.c
lib/libssl/src/crypto/bio/bss_fd.c
lib/libssl/src/crypto/bio/bss_sock.c
lib/libssl/src/crypto/x509/by_dir.c
lib/libssl/src/e_os.h
lib/libssl/src/ssl/s3_pkt.c

index 1ae9d96..0972fee 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 #include <openssl/bio.h>
-#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
-#include <netdb.h>
-#if defined(NETWARE_CLIB)
 #include <sys/ioctl.h>
-NETDB_DEFINE_CONTEXT
-#endif
-#endif
+
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index a272ada..27a4d37 100644 (file)
@@ -58,9 +58,9 @@
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 #include <openssl/bio.h>
+#include <sys/socket.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index 9c5320c..46667bc 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 #include <openssl/bio.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index 4c54601..50281b5 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
-
 #include <openssl/bio.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
 #ifndef OPENSSL_NO_DGRAM
 
 #ifndef OPENSSL_NO_SCTP
index 4369d64..b84719c 100644 (file)
@@ -58,7 +58,6 @@
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 
 #if defined(OPENSSL_NO_POSIX_IO)
index 5335495..7c49963 100644 (file)
@@ -58,8 +58,8 @@
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
+#include <sys/socket.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index 76f8244..bc60331 100644 (file)
@@ -218,7 +218,7 @@ add_cert_dir(BY_DIR *ctx, const char *dir, int type)
        s = dir;
        p = s;
        do {
-               if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) {
+               if ((*p == ':') || (*p == '\0')) {
                        BY_DIR_ENTRY *ent;
                        ss = s;
                        s = p + 1;
index c9a7b6c..d6c8756 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "ssl_locl.h"
 #include <openssl/evp.h>
 #include <openssl/buffer.h>
index 59fab2e..0dbec7d 100644 (file)
@@ -164,7 +164,7 @@ app_RAND_load_files(char *name)
        for (;;) {
                last = 0;
                for (p = name;
-                   ((*p != '\0') && (*p != LIST_SEPARATOR_CHAR)); p++);
+                   ((*p != '\0') && (*p != ':')); p++);
                        if (*p == '\0')
                                last = 1;
                *p = '\0';
index 246308f..95fc88d 100644 (file)
@@ -355,7 +355,7 @@ end:
                sk_OPENSSL_STRING_free(osk);
        OBJ_cleanup();
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static int
index 9c75e1a..cd33047 100644 (file)
@@ -1411,7 +1411,7 @@ err:
        NCONF_free(extconf);
        OBJ_cleanup();
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static void
index fb798a4..1586dc5 100644 (file)
@@ -204,5 +204,5 @@ end:
        if (STDout != NULL)
                BIO_free_all(STDout);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
index 58c7118..c89b881 100644 (file)
@@ -385,7 +385,7 @@ end:
                X509_STORE_free(store);
        }
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static X509_CRL *
index bfd2d81..ce78274 100644 (file)
@@ -262,7 +262,7 @@ end:
                X509_CRL_free(crl);
 
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 /*
index c024229..4a4fa6f 100644 (file)
@@ -507,7 +507,7 @@ end:
        if (bmd != NULL)
                BIO_free(bmd);
        apps_shutdown();
-       OPENSSL_EXIT(err);
+       exit(err);
 }
 
 int
index f362c5a..109a6c0 100644 (file)
@@ -322,7 +322,7 @@ end:
        if (dh != NULL)
                DH_free(dh);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 #else /* !OPENSSL_NO_DH */
 
index 9e1b214..c86d5ef 100644 (file)
@@ -253,7 +253,7 @@ bad:
 #ifndef OPENSSL_NO_ENGINE
                BIO_printf(bio_err, " -engine e     use engine e, possibly a hardware device.\n");
 #endif
-               BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':');
                BIO_printf(bio_err, "               - load the file (or the files in the directory) into\n");
                BIO_printf(bio_err, "               the random number generator\n");
                BIO_printf(bio_err, " -noout        no output\n");
@@ -494,7 +494,7 @@ end:
        if (dh != NULL)
                DH_free(dh);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 /* dh_cb is identical to dsa_cb in apps/dsaparam.c */
index 3dad043..37b9a3f 100644 (file)
@@ -350,7 +350,7 @@ end:
        if (passout)
                free(passout);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 #else /* !OPENSSL_NO_DSA */
 
index 81ac16b..1efa02f 100644 (file)
@@ -420,7 +420,7 @@ end:
        if (dsa != NULL)
                DSA_free(dsa);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static int
index f64608e..8575ba9 100644 (file)
@@ -353,7 +353,7 @@ end:
        if (passout)
                free(passout);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 #else /* !OPENSSL_NO_EC */
 
index e2b3bee..1e7020c 100644 (file)
@@ -689,7 +689,7 @@ end:
        if (group != NULL)
                EC_GROUP_free(group);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
index 22f431f..11768db 100644 (file)
@@ -686,7 +686,7 @@ end:
 #endif
        if(pass) free(pass);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 int set_hex(char *in, unsigned char *out, int size)
index be07889..b9f3121 100644 (file)
@@ -532,7 +532,7 @@ end:
        sk_OPENSSL_STRING_pop_free(post_cmds, identity);
        if (bio_out != NULL) BIO_free_all(bio_out);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 #else
 
index 00c489b..2a26c4e 100644 (file)
@@ -114,5 +114,5 @@ MAIN(int argc, char **argv)
                }
        }
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
index 00c31cf..531e37a 100644 (file)
@@ -151,7 +151,7 @@ bad:
 #ifndef OPENSSL_NO_ENGINE
                BIO_printf(bio_err, " -engine e - use engine e, possibly a hardware device.\n");
 #endif
-               BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':');
                BIO_printf(bio_err, "           - load the file (or the files in the directory) into\n");
                BIO_printf(bio_err, "             the random number generator\n");
                goto end;
@@ -202,7 +202,7 @@ end:
        if (dh != NULL)
                DH_free(dh);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static int
index 17dbd9d..c4e5415 100644 (file)
@@ -190,7 +190,7 @@ bad:
 #ifndef OPENSSL_NO_ENGINE
                BIO_printf(bio_err, " -engine e - use engine e, possibly a hardware device.\n");
 #endif
-               BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':');
                BIO_printf(bio_err, "           - load the file (or the files in the directory) into\n");
                BIO_printf(bio_err, "             the random number generator\n");
                BIO_printf(bio_err, " dsaparam-file\n");
@@ -263,7 +263,7 @@ end:
        if (passout)
                free(passout);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 #else /* !OPENSSL_NO_DSA */
 
index 65e136a..e6e9877 100644 (file)
@@ -215,7 +215,7 @@ bad:
 #ifndef OPENSSL_NO_ENGINE
                BIO_printf(bio_err, " -engine e       use engine e, possibly a hardware device.\n");
 #endif
-               BIO_printf(bio_err, " -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err, " -rand file%cfile%c...\n", ':', ':');
                BIO_printf(bio_err, "                 load the file (or the files in the directory) into\n");
                BIO_printf(bio_err, "                 the random number generator\n");
                goto err;
@@ -296,7 +296,7 @@ err:
                if (ret != 0)
                        ERR_print_errors(bio_err);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static int
index 4abb436..a965f1d 100644 (file)
@@ -102,7 +102,7 @@ int MAIN(int argc, char **argv)
                BIO_printf (bio_err, "-in file  input file\n");
                BIO_printf (bio_err, "-out file output file\n");
                BIO_printf (bio_err, "-toseq    output NS Sequence file\n");
-               OPENSSL_EXIT(1);
+               exit(1);
        }
 
        if (infile) {
@@ -156,6 +156,6 @@ end:
        BIO_free_all(out);
        NETSCAPE_CERT_SEQUENCE_free(seq);
 
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
index dff47ba..170bcac 100644 (file)
@@ -57,8 +57,6 @@
  */
 #ifndef OPENSSL_NO_OCSP
 
-#define USE_SOCKETS
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -922,7 +920,7 @@ end:
                free(path);
                }
 
-       OPENSSL_EXIT(ret);
+       return(ret);
 }
 
 static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, const EVP_MD *cert_id_md,X509 *issuer,
index fd730ce..8f0d11d 100644 (file)
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
-#define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */
 #include "progs.h"
 #include "s_apps.h"
 #include <openssl/err.h>
@@ -267,11 +266,11 @@ int main(int Argc, char *ARGV[])
                if (!FIPS_mode_set(1)) {
                        ERR_load_crypto_strings();
                        ERR_print_errors(BIO_new_fp(stderr,BIO_NOCLOSE));
-                       EXIT(1);
+                       exit(1);
                }
 #else
                fprintf(stderr, "FIPS mode not supported.\n");
-               EXIT(1);
+               exit(1);
 #endif
                }
 
@@ -391,7 +390,7 @@ end:
                BIO_free(bio_err);
                bio_err=NULL;
                }
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 #define LIST_STANDARD_COMMANDS "list-standard-commands"
index b26bdbf..ea62a14 100644 (file)
@@ -286,7 +286,7 @@ err:
        if (out)
                BIO_free_all(out);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 
@@ -497,6 +497,6 @@ err:
 int MAIN(int argc, char **argv)
        {
        fputs("Program not available.\n", stderr)
-       OPENSSL_EXIT(1);
+       exit(1);
        }
 #endif
index 9794718..74d063e 100644 (file)
@@ -335,7 +335,7 @@ int MAIN(int argc, char **argv)
 #ifndef OPENSSL_NO_ENGINE
        BIO_printf (bio_err, "-engine e     use engine e, possibly a hardware device.\n");
 #endif
-       BIO_printf(bio_err,  "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+       BIO_printf(bio_err,  "-rand file%cfile%c...\n", ':', ':');
        BIO_printf(bio_err,  "              load the file (or the files in the directory) into\n");
        BIO_printf(bio_err,  "              the random number generator\n");
        BIO_printf(bio_err,  "-CSP name     Microsoft CSP name\n");
@@ -692,7 +692,7 @@ int MAIN(int argc, char **argv)
     if(passin) free(passin);
     if(passout) free(passout);
     apps_shutdown();
-    OPENSSL_EXIT(ret);
+    exit(ret);
 }
 
 int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
index 272bf11..8a0e878 100644 (file)
@@ -310,5 +310,5 @@ end:
        if (in != NULL) BIO_free(in);
        if (out != NULL) BIO_free_all(out);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
index 884c244..c01df53 100644 (file)
@@ -168,7 +168,7 @@ int MAIN(int argc, char **argv)
 #ifndef OPENSSL_NO_ENGINE
                BIO_printf(bio_err, "-engine e             - use engine e, possibly a hardware device.\n");
 #endif
-               BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err, "-rand file%cfile%c... - seed PRNG from files\n", ':', ':');
                BIO_printf(bio_err, "-base64               - base64 encode output\n");
                BIO_printf(bio_err, "-hex                  - hex encode output\n");
                goto err;
@@ -235,5 +235,5 @@ err:
        if (out)
                BIO_free_all(out);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
index 3374626..22302c5 100644 (file)
@@ -422,7 +422,7 @@ bad:
                BIO_printf(bio_err," -key file      use the private key contained in file\n");
                BIO_printf(bio_err," -keyform arg   key file format\n");
                BIO_printf(bio_err," -keyout arg    file to send the key to\n");
-               BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err," -rand file%cfile%c...\n", ':', ':');
                BIO_printf(bio_err,"                load the file (or the files in the directory) into\n");
                BIO_printf(bio_err,"                the random number generator\n");
                BIO_printf(bio_err," -newkey rsa:bits generate a new RSA key of 'bits' in size\n");
@@ -1097,7 +1097,7 @@ end:
        if(passargout && passout) free(passout);
        OBJ_cleanup();
        apps_shutdown();
-       OPENSSL_EXIT(ex);
+       exit(ex);
        }
 
 static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int multirdn,
index 6352267..b367f23 100644 (file)
@@ -433,7 +433,7 @@ end:
        if(passin) free(passin);
        if(passout) free(passout);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 #else /* !OPENSSL_NO_RSA */
 
index 6c341d9..b5dc40c 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
-#define USE_SOCKETS
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
 #define NON_MAIN
 #include "apps.h"
 #undef NON_MAIN
-#undef USE_SOCKETS
 #include <openssl/err.h>
 #include <openssl/rand.h>
 #include <openssl/x509.h>
index a163ac9..0b300a5 100644 (file)
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <limits.h>
 #include <string.h>
 #include <openssl/e_os2.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 #ifdef OPENSSL_NO_STDIO
 #define APPS_WIN16
 #endif
 
-#define USE_SOCKETS
 #include "apps.h"
 #include <openssl/x509.h>
 #include <openssl/ssl.h>
@@ -338,7 +341,7 @@ static void sc_usage(void)
 #ifndef OPENSSL_NO_ENGINE
        BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 #endif
-       BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+       BIO_printf(bio_err," -rand file%cfile%c...\n", ':', ':');
        BIO_printf(bio_err," -sess_out arg - file to write SSL session to\n");
        BIO_printf(bio_err," -sess_in arg  - file to read SSL session from\n");
 #ifndef OPENSSL_NO_TLSEXT
@@ -1862,7 +1865,7 @@ end:
                bio_c_out=NULL;
                }
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 
index 1a2b980..1396992 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/socket.h>
 
 #include <openssl/e_os2.h>
 #ifdef OPENSSL_NO_STDIO
 
 #include <openssl/lhash.h>
 #include <openssl/bn.h>
-#define USE_SOCKETS
 #include "apps.h"
 #include <openssl/err.h>
 #include <openssl/pem.h>
@@ -523,7 +523,7 @@ static void sv_usage(void)
        BIO_printf(bio_err," -engine id    - Initialise and use the specified engine\n");
 #endif
        BIO_printf(bio_err," -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'\n");
-       BIO_printf(bio_err," -rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+       BIO_printf(bio_err," -rand file%cfile%c...\n", ':', ':');
 #ifndef OPENSSL_NO_TLSEXT
        BIO_printf(bio_err," -servername host - servername for HostName TLS extension\n");
        BIO_printf(bio_err," -servername_fatal - on mismatch send fatal alert (default warning alert)\n");
@@ -1744,7 +1744,7 @@ end:
                bio_s_out=NULL;
                }
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
index a0dabca..097c900 100644 (file)
@@ -61,6 +61,9 @@
 #include <string.h>
 #include <errno.h>
 #include <signal.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 #ifdef FLAT_INC
 #include "e_os2.h"
 #include "../e_os2.h"
 #endif
 
-#define USE_SOCKETS
 #define NON_MAIN
 #include "apps.h"
-#undef USE_SOCKETS
 #undef NON_MAIN
 #include "s_apps.h"
 #include <openssl/ssl.h>
index 1eb01f6..ee5f7c6 100644 (file)
@@ -66,8 +66,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/socket.h>
 
-#define USE_SOCKETS
 #include "apps.h"
 #ifdef OPENSSL_NO_STDIO
 #define APPS_WIN16
@@ -533,7 +533,7 @@ end:
                tm_ctx=NULL;
                }
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 /***********************************************************************
index 8fab8c0..5ad1bdd 100644 (file)
@@ -269,7 +269,7 @@ end:
        if (out != NULL) BIO_free_all(out);
        if (x != NULL) SSL_SESSION_free(x);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 static SSL_SESSION *load_sess_id(char *infile, int format)
index 4421e94..c4b976f 100644 (file)
@@ -485,7 +485,7 @@ int MAIN(int argc, char **argv)
                BIO_printf (bio_err, "-engine e      use engine e, possibly a hardware device.\n");
 #endif
                BIO_printf (bio_err, "-passin arg    input file pass phrase source\n");
-               BIO_printf(bio_err,  "-rand file%cfile%c...\n", LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+               BIO_printf(bio_err,  "-rand file%cfile%c...\n", ':', ':');
                BIO_printf(bio_err,  "               load the file (or the files in the directory) into\n");
                BIO_printf(bio_err,  "               the random number generator\n");
                BIO_printf (bio_err, "cert.pem       recipient certificate(s) for encryption\n");
index acae09e..59f28e4 100644 (file)
@@ -2522,7 +2522,7 @@ end:
 #endif
 
        apps_shutdown();
-       OPENSSL_EXIT(mret);
+       exit(mret);
        }
 
 static void print_message(const char *s, long num, int length)
index 8d29dce..3caf5c0 100644 (file)
@@ -292,5 +292,5 @@ end:
        EVP_PKEY_free(pkey);
        if(passin) free(passin);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
index 15f3315..2ce1d40 100644 (file)
@@ -741,7 +741,7 @@ err:
 
        OBJ_cleanup();
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 
index 9528631..799c5b3 100644 (file)
@@ -371,7 +371,7 @@ int MAIN(int argc, char **argv)
                   "[-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] "
                   "[-policy object_id] [-no_nonce] [-cert] "
                   "[-in request.tsq] [-out request.tsq] [-text]\n",
-                  LIST_SEPARATOR_CHAR, LIST_SEPARATOR_CHAR);
+                  ':', ':');
        BIO_printf(bio_err, "or\n"
                   "ts -reply [-config configfile] [-section tsa_section] "
                   "[-queryfile request.tsq] [-passin password] "
@@ -397,7 +397,7 @@ int MAIN(int argc, char **argv)
                bio_err = NULL;
                }
 
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 /*
index ea1a2e6..135d76d 100644 (file)
@@ -260,7 +260,7 @@ end:
        sk_X509_pop_free(trusted, X509_free);
        sk_X509_CRL_pop_free(crls, X509_CRL_free);
        apps_shutdown();
-       OPENSSL_EXIT(ret < 0 ? 2 : ret);
+       exit(ret < 0 ? 2 : ret);
        }
 
 static int check(X509_STORE *ctx, char *file,
index e9555cb..811ac26 100644 (file)
@@ -213,5 +213,5 @@ int MAIN(int argc, char **argv)
        if (dir)  printf("%s\n",SSLeay_version(SSLEAY_DIR));
 end:
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
index 4e5ce37..0026793 100644 (file)
@@ -1089,7 +1089,7 @@ end:
        sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
        if (passin) free(passin);
        apps_shutdown();
-       OPENSSL_EXIT(ret);
+       return(ret);
        }
 
 static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create)
index 1ae9d96..0972fee 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 #include <openssl/bio.h>
-#if defined(OPENSSL_SYS_NETWARE) && defined(NETWARE_BSDSOCK)
-#include <netdb.h>
-#if defined(NETWARE_CLIB)
 #include <sys/ioctl.h>
-NETDB_DEFINE_CONTEXT
-#endif
-#endif
+
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index a272ada..27a4d37 100644 (file)
@@ -58,9 +58,9 @@
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 #include <openssl/bio.h>
+#include <sys/socket.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index 9c5320c..46667bc 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 #include <openssl/bio.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index 4c54601..50281b5 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
-
 #include <openssl/bio.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
 #ifndef OPENSSL_NO_DGRAM
 
 #ifndef OPENSSL_NO_SCTP
index 4369d64..b84719c 100644 (file)
@@ -58,7 +58,6 @@
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
 
 #if defined(OPENSSL_NO_POSIX_IO)
index 5335495..7c49963 100644 (file)
@@ -58,8 +58,8 @@
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "cryptlib.h"
+#include <sys/socket.h>
 
 #ifndef OPENSSL_NO_SOCK
 
index 76f8244..bc60331 100644 (file)
@@ -218,7 +218,7 @@ add_cert_dir(BY_DIR *ctx, const char *dir, int type)
        s = dir;
        p = s;
        do {
-               if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0')) {
+               if ((*p == ':') || (*p == '\0')) {
                        BY_DIR_ENTRY *ent;
                        ss = s;
                        s = p + 1;
index b9278c9..e661792 100644 (file)
 
 #include <openssl/opensslconf.h>
 
+/*
+ * <openssl/e_os2.h> contains what we can justify to make visible
+ * to the outside
+ * <openssl/e_os2.h> is not exported interface (except to the openssl
+ * command)
+ */
+
 #include <openssl/e_os2.h>
-/* <openssl/e_os2.h> contains what we can justify to make visible
- * to the outside; this file e_os.h is not part of the exported
- * interface. */
 
 #ifdef  __cplusplus
 extern "C" {
@@ -76,44 +80,10 @@ extern "C" {
 #define REF_PRINT(a,b) fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->references,a)
 #endif
 
-#      include <unistd.h>
-#      include <sys/types.h>
-#    define OPENSSL_CONF       "openssl.cnf"
-#    define SSLEAY_CONF                OPENSSL_CONF
-#    define RFILE              ".rnd"
-#    define LIST_SEPARATOR_CHAR ':'
-#    define EXIT(n)            exit(n)
-
-
-#ifdef USE_SOCKETS
-#    include <sys/param.h>
-#    include <sys/time.h> /* Needed under linux for FD_XXX */
-#    include <netdb.h>
-#    include <sys/socket.h>
-#    include <netinet/in.h>
-#    include <sys/ioctl.h>
-#endif
-
-/* Some IPv6 implementations are broken, disable them in known bad
- * versions.
- */
-#  if !defined(OPENSSL_USE_IPV6)
-#    if defined(AF_INET6)
-#      define OPENSSL_USE_IPV6 1
-#    else
-#      define OPENSSL_USE_IPV6 0
-#    endif
-#  endif
-
-#ifndef OPENSSL_EXIT
-# if defined(MONOLITH) && !defined(OPENSSL_C)
-#  define OPENSSL_EXIT(n) return(n)
-# else
-#  define OPENSSL_EXIT(n) do { EXIT(n); return(n); } while(0)
-# endif
-#endif
+#define OPENSSL_CONF   "openssl.cnf"
+#define RFILE          ".rnd"
 
-/***********************************************/
+#define OPENSSL_USE_IPV6 1
 
 #ifdef  __cplusplus
 }
index c9a7b6c..d6c8756 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#define USE_SOCKETS
 #include "ssl_locl.h"
 #include <openssl/evp.h>
 #include <openssl/buffer.h>