summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/asn1pars.c2
-rw-r--r--apps/ca.c2
-rw-r--r--apps/ciphers.c2
-rw-r--r--apps/crl.c2
-rw-r--r--apps/crl2p7.c2
-rw-r--r--apps/dgst.c2
-rw-r--r--apps/dh.c2
-rw-r--r--apps/dhparam.c2
-rw-r--r--apps/dsa.c2
-rw-r--r--apps/dsaparam.c2
-rw-r--r--apps/ec.c2
-rw-r--r--apps/ecparam.c2
-rw-r--r--apps/enc.c2
-rw-r--r--apps/engine.c2
-rw-r--r--apps/errstr.c2
-rw-r--r--apps/gendh.c2
-rw-r--r--apps/gendsa.c2
-rw-r--r--apps/genrsa.c2
-rw-r--r--apps/nseq.c4
-rw-r--r--apps/ocsp.c2
-rw-r--r--apps/openssl.c2
-rw-r--r--apps/passwd.c4
-rw-r--r--apps/pkcs12.c2
-rw-r--r--apps/pkcs7.c2
-rw-r--r--apps/rand.c2
-rw-r--r--apps/req.c2
-rw-r--r--apps/rsa.c2
-rw-r--r--apps/s_client.c2
-rw-r--r--apps/s_server.c2
-rw-r--r--apps/s_time.c2
-rw-r--r--apps/sess_id.c2
-rw-r--r--apps/speed.c2
-rw-r--r--apps/spkac.c2
-rw-r--r--apps/verify.c2
-rw-r--r--apps/version.c2
-rw-r--r--apps/x509.c2
-rw-r--r--e_os.h30
37 files changed, 53 insertions, 53 deletions
diff --git a/apps/asn1pars.c b/apps/asn1pars.c
index dc41da38a0..5f8ba5e730 100644
--- a/apps/asn1pars.c
+++ b/apps/asn1pars.c
@@ -361,7 +361,7 @@ end:
if (osk != NULL) sk_free(osk);
OBJ_cleanup();
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf)
diff --git a/apps/ca.c b/apps/ca.c
index cac83a114f..8cb5342ce0 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -1652,7 +1652,7 @@ err:
NCONF_free(conf);
OBJ_cleanup();
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static void lookup_fail(char *name, char *tag)
diff --git a/apps/ciphers.c b/apps/ciphers.c
index fe26ae8cd6..7c62fc5dc3 100644
--- a/apps/ciphers.c
+++ b/apps/ciphers.c
@@ -203,6 +203,6 @@ end:
if (ssl != NULL) SSL_free(ssl);
if (STDout != NULL) BIO_free_all(STDout);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/crl.c b/apps/crl.c
index 00946b4d20..c6089ace52 100644
--- a/apps/crl.c
+++ b/apps/crl.c
@@ -377,7 +377,7 @@ end:
X509_STORE_free(store);
}
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static X509_CRL *load_crl(char *infile, int format)
diff --git a/apps/crl2p7.c b/apps/crl2p7.c
index 8729068462..b2f2d121d5 100644
--- a/apps/crl2p7.c
+++ b/apps/crl2p7.c
@@ -280,7 +280,7 @@ end:
if (crl != NULL) X509_CRL_free(crl);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
/*
diff --git a/apps/dgst.c b/apps/dgst.c
index c4bb7a1061..280f79b4a2 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -365,7 +365,7 @@ end:
if(sigbuf) OPENSSL_free(sigbuf);
if (bmd != NULL) BIO_free(bmd);
apps_shutdown();
- EXIT(err);
+ OPENSSL_EXIT(err);
}
int do_fp(BIO *out, unsigned char *buf, BIO *bp, int sep, int binout,
diff --git a/apps/dh.c b/apps/dh.c
index 27c3dc8df2..c10ea96b90 100644
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -333,6 +333,6 @@ end:
if (out != NULL) BIO_free_all(out);
if (dh != NULL) DH_free(dh);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
#endif
diff --git a/apps/dhparam.c b/apps/dhparam.c
index ea15ef3236..cbc65bcc5f 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -519,7 +519,7 @@ end:
if (out != NULL) BIO_free_all(out);
if (dh != NULL) DH_free(dh);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
/* dh_cb is identical to dsa_cb in apps/dsaparam.c */
diff --git a/apps/dsa.c b/apps/dsa.c
index 9da1a41645..65988717bb 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -314,6 +314,6 @@ end:
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
#endif
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index 2f436803e3..320d76f632 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -372,7 +372,7 @@ end:
if (out != NULL) BIO_free_all(out);
if (dsa != NULL) DSA_free(dsa);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
diff --git a/apps/ec.c b/apps/ec.c
index 71ffaecb15..7d57341cb4 100644
--- a/apps/ec.c
+++ b/apps/ec.c
@@ -390,6 +390,6 @@ end:
if (passout)
OPENSSL_free(passout);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
#endif
diff --git a/apps/ecparam.c b/apps/ecparam.c
index 02bf6c1a9d..3bd0a97487 100644
--- a/apps/ecparam.c
+++ b/apps/ecparam.c
@@ -679,7 +679,7 @@ end:
if (group != NULL)
EC_GROUP_free(group);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
diff --git a/apps/enc.c b/apps/enc.c
index bae7f21d79..42ddfd244b 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -586,7 +586,7 @@ end:
if (b64 != NULL) BIO_free(b64);
if(pass) OPENSSL_free(pass);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
int set_hex(char *in, unsigned char *out, int size)
diff --git a/apps/engine.c b/apps/engine.c
index 734ecb3e5d..b718ae124c 100644
--- a/apps/engine.c
+++ b/apps/engine.c
@@ -516,5 +516,5 @@ end:
sk_pop_free(post_cmds, identity);
if (bio_out != NULL) BIO_free_all(bio_out);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/errstr.c b/apps/errstr.c
index fedb568d68..19489b0df3 100644
--- a/apps/errstr.c
+++ b/apps/errstr.c
@@ -122,5 +122,5 @@ int MAIN(int argc, char **argv)
}
}
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/gendh.c b/apps/gendh.c
index f2542960bf..98ee413c74 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -198,7 +198,7 @@ end:
if (out != NULL) BIO_free_all(out);
if (dh != NULL) DH_free(dh);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static void MS_CALLBACK dh_cb(int p, int n, void *arg)
diff --git a/apps/gendsa.c b/apps/gendsa.c
index 1e1e9f3e4c..4600711c36 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -246,6 +246,6 @@ end:
if (dsa != NULL) DSA_free(dsa);
if(passout) OPENSSL_free(passout);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
#endif
diff --git a/apps/genrsa.c b/apps/genrsa.c
index 515bd7c901..dbc23e40aa 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -258,7 +258,7 @@ err:
if (ret != 0)
ERR_print_errors(bio_err);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static void MS_CALLBACK genrsa_cb(int p, int n, void *arg)
diff --git a/apps/nseq.c b/apps/nseq.c
index c26f62cb61..dc71d45012 100644
--- a/apps/nseq.c
+++ b/apps/nseq.c
@@ -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");
- EXIT(1);
+ OPENSSL_EXIT(1);
}
if (infile) {
@@ -162,6 +162,6 @@ end:
BIO_free_all(out);
NETSCAPE_CERT_SEQUENCE_free(seq);
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/ocsp.c b/apps/ocsp.c
index d759b2709c..92922bc8ad 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -899,7 +899,7 @@ end:
SSL_CTX_free(ctx);
}
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static int add_ocsp_cert(OCSP_REQUEST **req, X509 *cert, X509 *issuer,
diff --git a/apps/openssl.c b/apps/openssl.c
index 45f8d7f4ef..47896472e8 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -358,7 +358,7 @@ end:
BIO_free(bio_err);
bio_err=NULL;
}
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
#define LIST_STANDARD_COMMANDS "list-standard-commands"
diff --git a/apps/passwd.c b/apps/passwd.c
index 0c2cf62e8b..3ad91d89d6 100644
--- a/apps/passwd.c
+++ b/apps/passwd.c
@@ -292,7 +292,7 @@ err:
if (out)
BIO_free_all(out);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
@@ -505,6 +505,6 @@ err:
int MAIN(int argc, char **argv)
{
fputs("Program not available.\n", stderr)
- EXIT(1);
+ OPENSSL_EXIT(1);
}
#endif
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 536cf57c15..e445c24b9b 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -651,7 +651,7 @@ int MAIN(int argc, char **argv)
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
int dump_certs_keys_p12 (BIO *out, PKCS12 *p12, char *pass,
diff --git a/apps/pkcs7.c b/apps/pkcs7.c
index 0cced40f0f..738dd853ce 100644
--- a/apps/pkcs7.c
+++ b/apps/pkcs7.c
@@ -301,5 +301,5 @@ end:
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free_all(out);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/rand.c b/apps/rand.c
index f51f5bec35..eaaa6e35a6 100644
--- a/apps/rand.c
+++ b/apps/rand.c
@@ -213,5 +213,5 @@ err:
if (out)
BIO_free_all(out);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/req.c b/apps/req.c
index 980138f041..a582e69775 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -1150,7 +1150,7 @@ end:
if (ec_params != NULL) EC_KEY_free(ec_params);
#endif
apps_shutdown();
- EXIT(ex);
+ OPENSSL_EXIT(ex);
}
static int make_REQ(X509_REQ *req, EVP_PKEY *pkey, char *subj, int attribs,
diff --git a/apps/rsa.c b/apps/rsa.c
index 4e19bc16fb..aebec744a2 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -369,7 +369,7 @@ end:
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
#else /* !OPENSSL_NO_RSA */
diff --git a/apps/s_client.c b/apps/s_client.c
index 7b1fa7b22b..738588c6aa 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -917,7 +917,7 @@ end:
bio_c_out=NULL;
}
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/s_server.c b/apps/s_server.c
index 7380fcc85f..aa7ff66b70 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -946,7 +946,7 @@ end:
bio_s_out=NULL;
}
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static void print_stats(BIO *bio, SSL_CTX *ssl_ctx)
diff --git a/apps/s_time.c b/apps/s_time.c
index 181a7c82f6..1ad16cd607 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -642,7 +642,7 @@ end:
tm_ctx=NULL;
}
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
/***********************************************************************
diff --git a/apps/sess_id.c b/apps/sess_id.c
index 41c3b3f4a3..d91d84d220 100644
--- a/apps/sess_id.c
+++ b/apps/sess_id.c
@@ -273,7 +273,7 @@ end:
if (out != NULL) BIO_free_all(out);
if (x != NULL) SSL_SESSION_free(x);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static SSL_SESSION *load_sess_id(char *infile, int format)
diff --git a/apps/speed.c b/apps/speed.c
index 27f2e675cd..800ecd35d6 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -2316,7 +2316,7 @@ end:
#endif
apps_shutdown();
- EXIT(mret);
+ OPENSSL_EXIT(mret);
}
static void print_message(const char *s, long num, int length)
diff --git a/apps/spkac.c b/apps/spkac.c
index 4ce53e36c9..ed370c5ca9 100644
--- a/apps/spkac.c
+++ b/apps/spkac.c
@@ -295,5 +295,5 @@ end:
EVP_PKEY_free(pkey);
if(passin) OPENSSL_free(passin);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/verify.c b/apps/verify.c
index e4cbceaf8e..9a18213ece 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -232,7 +232,7 @@ end:
sk_X509_pop_free(untrusted, X509_free);
sk_X509_pop_free(trusted, X509_free);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)
diff --git a/apps/version.c b/apps/version.c
index 435e0b4bb3..041da37e99 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -212,5 +212,5 @@ int MAIN(int argc, char **argv)
if (dir) printf("%s\n",SSLeay_version(SSLEAY_DIR));
end:
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
diff --git a/apps/x509.c b/apps/x509.c
index 0f6e9ad907..9709628df3 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -1029,7 +1029,7 @@ end:
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
if (passin) OPENSSL_free(passin);
apps_shutdown();
- EXIT(ret);
+ OPENSSL_EXIT(ret);
}
static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
diff --git a/e_os.h b/e_os.h
index 5d761781b8..db9ba97ec8 100644
--- a/e_os.h
+++ b/e_os.h
@@ -243,10 +243,11 @@ extern "C" {
# define _kbhit kbhit
# endif
-# if defined(WIN16) && !defined(MONOLITH) && defined(SSLEAY) && defined(_WINEXITNOPERSIST)
-# define EXIT(n) do { if (n == 0) _wsetexit(_WINEXITNOPERSIST); return(n); } while(0)
+# if defined(WIN16) && defined(SSLEAY) && defined(_WINEXITNOPERSIST)
+# define EXIT(n) _wsetexit(_WINEXITNOPERSIST)
+# define OPENSSL_EXIT(n) do { if (n == 0) EXIT(n); return(n); } while(0)
# else
-# define EXIT(n) return(n)
+# define EXIT(n) return(n)
# endif
# define LIST_SEPARATOR_CHAR ';'
# ifndef X_OK
@@ -302,18 +303,13 @@ extern "C" {
the status is tagged as an error, which I believe is what is wanted here.
-- Richard Levitte
*/
-# if !defined(MONOLITH) || defined(OPENSSL_C)
-# define EXIT(n) do { int __VMS_EXIT = n; \
+# define EXIT(n) do { int __VMS_EXIT = n; \
if (__VMS_EXIT == 0) \
__VMS_EXIT = 1; \
else \
__VMS_EXIT = (n << 3) | 2; \
__VMS_EXIT |= 0x10000000; \
- exit(__VMS_EXIT); \
- return(__VMS_EXIT); } while(0)
-# else
-# define EXIT(n) return(n)
-# endif
+ exit(__VMS_EXIT); } while(0)
# define NO_SYS_PARAM_H
# else
/* !defined VMS */
@@ -344,11 +340,7 @@ extern "C" {
# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ':'
# define NUL_DEV "/dev/null"
-# ifndef MONOLITH
-# define EXIT(n) do { exit(n); return(n); } while(0)
-# else
-# define EXIT(n) return(n)
-# endif
+# define EXIT(n) exit(n)
# endif
# define SSLeay_getpid() getpid()
@@ -475,6 +467,14 @@ extern char *sys_errlist[]; extern int sys_nerr;
(((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum])
#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
+
/***********************************************/
/* do we need to do this for getenv.