Have all tests use EXIT() to exit rather than exit(), since the latter doesn't
authorRichard Levitte <levitte@openssl.org>
Thu, 28 Nov 2002 18:54:30 +0000 (18:54 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 28 Nov 2002 18:54:30 +0000 (18:54 +0000)
always give the expected result on some platforms.

24 files changed:
crypto/bf/bftest.c
crypto/bn/bntest.c
crypto/bn/exptest.c
crypto/cast/casttest.c
crypto/dh/dhtest.c
crypto/dsa/dsatest.c
crypto/ec/ectest.c
crypto/ecdh/ecdhtest.c
crypto/evp/evp_test.c
crypto/hmac/hmactest.c
crypto/idea/ideatest.c
crypto/md2/md2test.c
crypto/md4/md4test.c
crypto/md5/md5test.c
crypto/mdc2/mdc2test.c
crypto/rand/randtest.c
crypto/rc2/rc2test.c
crypto/rc4/rc4test.c
crypto/rc5/rc5test.c
crypto/ripemd/rmdtest.c
crypto/sha/sha1test.c
crypto/sha/shatest.c
ssl/ssltest.c
test/methtest.c

index c85bc3253377235c66ab7698f4c2557f8759e5da..24d526b14bdb94163e31b44fdae4bbcdca736ccd 100644 (file)
@@ -63,6 +63,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_BF
 int main(int argc, char *argv[])
 {
@@ -275,7 +277,7 @@ int main(int argc, char *argv[])
        else
                ret=test();
 
-       exit(ret);
+       EXIT(ret);
        return(0);
        }
 
index 689683a52d6d5a26f69a0061a1258035fc347549..d87ccf9c6a89fe0c34d4570a9a5d6710947a1733 100644 (file)
@@ -163,10 +163,10 @@ int main(int argc, char *argv[])
 
 
        ctx=BN_CTX_new();
-       if (ctx == NULL) exit(1);
+       if (ctx == NULL) EXIT(1);
 
        out=BIO_new(BIO_s_file());
-       if (out == NULL) exit(1);
+       if (out == NULL) EXIT(1);
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
@@ -176,7 +176,7 @@ int main(int argc, char *argv[])
                if (!BIO_write_filename(out,outfile))
                        {
                        perror(outfile);
-                       exit(1);
+                       EXIT(1);
                        }
                }
 
@@ -296,14 +296,14 @@ int main(int argc, char *argv[])
        BIO_free(out);
 
 /**/
-       exit(0);
+       EXIT(0);
 err:
        BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices
                              * the failure, see test_bn in test/Makefile.ssl*/
        BIO_flush(out);
        ERR_load_crypto_strings();
        ERR_print_errors_fp(stderr);
-       exit(1);
+       EXIT(1);
        return(1);
        }
 
@@ -546,7 +546,7 @@ int test_mul(BIO *bp)
        BN_CTX *ctx;
 
        ctx = BN_CTX_new();
-       if (ctx == NULL) exit(1);
+       if (ctx == NULL) EXIT(1);
        
        BN_init(&a);
        BN_init(&b);
@@ -784,7 +784,7 @@ int test_mod_mul(BIO *bp, BN_CTX *ctx)
                        while ((l=ERR_get_error()))
                                fprintf(stderr,"ERROR:%s\n",
                                        ERR_error_string(l,NULL));
-                       exit(1);
+                       EXIT(1);
                        }
                if (bp != NULL)
                        {
index 5ca570d1a8a23daa3846ba16af5dc6c71cc9329c..621e6a9eeeb57ade010e21d8da1e17c59d65963a 100644 (file)
@@ -59,6 +59,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include "../e_os.h"
+
 #include <openssl/bio.h>
 #include <openssl/bn.h>
 #include <openssl/rand.h>
@@ -86,7 +89,7 @@ int main(int argc, char *argv[])
        ERR_load_BN_strings();
 
        ctx=BN_CTX_new();
-       if (ctx == NULL) exit(1);
+       if (ctx == NULL) EXIT(1);
        r_mont=BN_new();
        r_recp=BN_new();
        r_simple=BN_new();
@@ -99,7 +102,7 @@ int main(int argc, char *argv[])
 
        out=BIO_new(BIO_s_file());
 
-       if (out == NULL) exit(1);
+       if (out == NULL) EXIT(1);
        BIO_set_fp(out,stdout,BIO_NOCLOSE);
 
        for (i=0; i<200; i++)
@@ -124,7 +127,7 @@ int main(int argc, char *argv[])
                        {
                        printf("BN_mod_exp_mont() problems\n");
                        ERR_print_errors(out);
-                       exit(1);
+                       EXIT(1);
                        }
 
                ret=BN_mod_exp_recp(r_recp,a,b,m,ctx);
@@ -132,7 +135,7 @@ int main(int argc, char *argv[])
                        {
                        printf("BN_mod_exp_recp() problems\n");
                        ERR_print_errors(out);
-                       exit(1);
+                       EXIT(1);
                        }
 
                ret=BN_mod_exp_simple(r_simple,a,b,m,ctx);
@@ -140,7 +143,7 @@ int main(int argc, char *argv[])
                        {
                        printf("BN_mod_exp_simple() problems\n");
                        ERR_print_errors(out);
-                       exit(1);
+                       EXIT(1);
                        }
 
                if (BN_cmp(r_simple, r_mont) == 0
@@ -163,7 +166,7 @@ int main(int argc, char *argv[])
                        printf("\nrecp     ="); BN_print(out,r_recp);
                        printf("\nmont     ="); BN_print(out,r_mont);
                        printf("\n");
-                       exit(1);
+                       EXIT(1);
                        }
                }
        BN_free(r_mont);
@@ -177,11 +180,11 @@ int main(int argc, char *argv[])
        CRYPTO_mem_leaks(out);
        BIO_free(out);
        printf(" done\n");
-       exit(0);
+       EXIT(0);
 err:
        ERR_load_crypto_strings();
        ERR_print_errors(out);
-       exit(1);
+       EXIT(1);
        return(1);
        }
 
index 099e790886ca417754392430e7d66cbeb08a2311..83e5a16c73f21c32a419fd81ddaef1b8359c7257 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_CAST
 int main(int argc, char *argv[])
 {
@@ -224,7 +226,7 @@ int main(int argc, char *argv[])
       }
 #endif
 
-    exit(err);
+    EXIT(err);
     return(err);
     }
 #endif
index 34894ced73541865041532695e0b720d4cb8a90d..27237741da06d037e9377336f06e52366de51b5a 100644 (file)
@@ -59,6 +59,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include "../e_os.h"
+
 #ifdef OPENSSL_SYS_WINDOWS
 #include "../bio/bss_file.c" 
 #endif
@@ -111,7 +114,7 @@ int main(int argc, char *argv[])
        RAND_seed(rnd_seed, sizeof rnd_seed);
 
        out=BIO_new(BIO_s_file());
-       if (out == NULL) exit(1);
+       if (out == NULL) EXIT(1);
        BIO_set_fp(out,stdout,BIO_NOCLOSE);
 
        a=DH_generate_parameters(64,DH_GENERATOR_5,cb,out);
@@ -195,7 +198,7 @@ err:
        CRYPTO_cleanup_all_ex_data();
        ERR_remove_state(0);
        CRYPTO_mem_leaks_fp(stderr);
-       exit(ret);
+       EXIT(ret);
        return(ret);
        }
 
index 12da64f9f49fb495ddbe3ff6f5bde38683f489bc..4c411f2c8c2786176cef1190877ea8eef8530c96 100644 (file)
@@ -61,6 +61,9 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#include "../e_os.h"
+
 #include <openssl/crypto.h>
 #include <openssl/rand.h>
 #include <openssl/bio.h>
@@ -212,7 +215,7 @@ end:
                BIO_free(bio_err);
                bio_err = NULL;
                }
-       exit(!ret);
+       EXIT(!ret);
        return(0);
        }
 
@@ -231,7 +234,7 @@ static void MS_CALLBACK dsa_cb(int p, int n, void *arg)
        if (!ok && (p == 0) && (num > 1))
                {
                BIO_printf((BIO *)arg,"error in dsatest\n");
-               exit(1);
+               EXIT(1);
                }
        }
 #endif
index a396dd8f028ffe4cb29ba4c77a83fdc64c7e68aa..d7e606db715e6bbc31cdb1f315191250f7a784fd 100644 (file)
@@ -95,7 +95,7 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur
        fflush(stdout); \
        fprintf(stderr, "%s:%d: ABORT\n", __FILE__, __LINE__); \
        ERR_print_errors_fp(stderr); \
-       exit(1); \
+       EXIT(1); \
 } while (0)
 
 void prime_field_tests(void);
index 32b6a9ab8980483667cf3bad674f69f2399ee7b0..8af35322bbf42d0656dd7627df267e0e599719d6 100644 (file)
@@ -70,6 +70,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#include "../e_os.h"
+
 #ifdef OPENSSL_SYS_WINDOWS
 #include "../bio/bss_file.c" 
 #endif
@@ -298,7 +301,7 @@ int main(int argc, char *argv[])
        RAND_seed(rnd_seed, sizeof rnd_seed);
 
        out=BIO_new(BIO_s_file());
-       if (out == NULL) exit(1);
+       if (out == NULL) EXIT(1);
        BIO_set_fp(out,stdout,BIO_NOCLOSE);
 
        if ((ctx=BN_CTX_new()) == NULL) goto err;
@@ -330,7 +333,7 @@ err:
        CRYPTO_cleanup_all_ex_data();
        ERR_remove_state(0);
        CRYPTO_mem_leaks_fp(stderr);
-       exit(ret);
+       EXIT(ret);
        return(ret);
        }
 
index 90294ef686eec973b36a4f7a954eef4ce84aadfa..447a431a04383f896cc4fd0e2522193091b8de5b 100644 (file)
@@ -49,6 +49,9 @@
 
 #include <stdio.h>
 #include <string.h>
+
+#include "../e_os.h"
+
 #include <openssl/evp.h>
 #include <openssl/engine.h>
 #include <openssl/conf.h>
@@ -78,7 +81,7 @@ static int convert(unsigned char *s)
        if(!s[1])
            {
            fprintf(stderr,"Odd number of hex digits!");
-           exit(4);
+           EXIT(4);
            }
        sscanf((char *)s,"%2x",&n);
        *d=(unsigned char)n;
@@ -142,7 +145,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
        {
        fprintf(stderr,"Key length doesn't match, got %d expected %d\n",kn,
                c->key_len);
-       exit(5);
+       EXIT(5);
        }
     EVP_CIPHER_CTX_init(&ctx);
     if (encdec != 0)
@@ -150,26 +153,26 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
        if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv))
            {
            fprintf(stderr,"EncryptInit failed\n");
-           exit(10);
+           EXIT(10);
            }
        EVP_CIPHER_CTX_set_padding(&ctx,0);
 
        if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn))
            {
            fprintf(stderr,"Encrypt failed\n");
-           exit(6);
+           EXIT(6);
            }
        if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2))
            {
            fprintf(stderr,"EncryptFinal failed\n");
-           exit(7);
+           EXIT(7);
            }
 
        if(outl+outl2 != cn)
            {
            fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n",
                    outl+outl2,cn);
-           exit(8);
+           EXIT(8);
            }
 
        if(memcmp(out,ciphertext,cn))
@@ -177,7 +180,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
            fprintf(stderr,"Ciphertext mismatch\n");
            hexdump(stderr,"Got",out,cn);
            hexdump(stderr,"Expected",ciphertext,cn);
-           exit(9);
+           EXIT(9);
            }
        }
 
@@ -186,26 +189,26 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
        if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv))
            {
            fprintf(stderr,"DecryptInit failed\n");
-           exit(11);
+           EXIT(11);
            }
        EVP_CIPHER_CTX_set_padding(&ctx,0);
 
        if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn))
            {
            fprintf(stderr,"Decrypt failed\n");
-           exit(6);
+           EXIT(6);
            }
        if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2))
            {
            fprintf(stderr,"DecryptFinal failed\n");
-           exit(7);
+           EXIT(7);
            }
 
        if(outl+outl2 != cn)
            {
            fprintf(stderr,"Plaintext length mismatch got %d expected %d\n",
                    outl+outl2,cn);
-           exit(8);
+           EXIT(8);
            }
 
        if(memcmp(out,plaintext,cn))
@@ -213,7 +216,7 @@ static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
            fprintf(stderr,"Plaintext mismatch\n");
            hexdump(stderr,"Got",out,cn);
            hexdump(stderr,"Expected",plaintext,cn);
-           exit(9);
+           EXIT(9);
            }
        }
 
@@ -260,24 +263,24 @@ static int test_digest(const char *digest,
     if(!EVP_DigestInit_ex(&ctx,d, NULL))
        {
        fprintf(stderr,"DigestInit failed\n");
-       exit(100);
+       EXIT(100);
        }
     if(!EVP_DigestUpdate(&ctx,plaintext,pn))
        {
        fprintf(stderr,"DigestUpdate failed\n");
-       exit(101);
+       EXIT(101);
        }
     if(!EVP_DigestFinal_ex(&ctx,md,&mdn))
        {
        fprintf(stderr,"DigestFinal failed\n");
-       exit(101);
+       EXIT(101);
        }
     EVP_MD_CTX_cleanup(&ctx);
 
     if(mdn != cn)
        {
        fprintf(stderr,"Digest length mismatch, got %d expected %d\n",mdn,cn);
-       exit(102);
+       EXIT(102);
        }
 
     if(memcmp(md,ciphertext,cn))
@@ -285,7 +288,7 @@ static int test_digest(const char *digest,
        fprintf(stderr,"Digest mismatch\n");
        hexdump(stderr,"Got",md,cn);
        hexdump(stderr,"Expected",ciphertext,cn);
-       exit(103);
+       EXIT(103);
        }
 
     printf("\n");
@@ -303,7 +306,7 @@ int main(int argc,char **argv)
     if(argc != 2)
        {
        fprintf(stderr,"%s <test file>\n",argv[0]);
-       exit(1);
+       EXIT(1);
        }
     CRYPTO_malloc_debug_init();
     CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
@@ -315,7 +318,7 @@ int main(int argc,char **argv)
     if(!f)
        {
        perror(szTestFile);
-       exit(2);
+       EXIT(2);
        }
 
     /* Load up the software EVP_CIPHER and EVP_MD definitions */
@@ -371,7 +374,7 @@ int main(int argc,char **argv)
           && !test_digest(cipher,plaintext,pn,ciphertext,cn))
            {
            fprintf(stderr,"Can't find %s\n",cipher);
-           exit(3);
+           EXIT(3);
            }
        }
 
index 96d3beb8e6180e8f5ee3ee423767beb3bb2f8996..8111901f01fdde97ef6c82676bc9498d8da9785d 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_HMAC
 int main(int argc, char *argv[])
 {
@@ -144,7 +146,7 @@ int main(int argc, char *argv[])
                else
                        printf("test %d ok\n",i);
                }
-       exit(err);
+       EXIT(err);
        return(0);
        }
 
index 2c16f95b8a7aa5e89c0e47f629d92c71bda9fe81..98f805d72a599fccdde416e94491ef9ce809be2b 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_IDEA
 int main(int argc, char *argv[])
 {
@@ -167,7 +169,7 @@ int main(int argc, char *argv[])
        else
                printf("ok\n");
 
-       exit(err);
+       EXIT(err);
        return(err);
        }
 
index 7d3664faf5972ffe3e66afaf96bb807556d24e69..d2f6dce97fa09c10ff40c1d7bacce25103131c56 100644 (file)
@@ -61,6 +61,8 @@
 #include <string.h>
 #include <openssl/md2.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_MD2
 int main(int argc, char *argv[])
 {
@@ -122,7 +124,7 @@ int main(int argc, char *argv[])
                R++;
                P++;
                }
-       exit(err);
+       EXIT(err);
        return(0);
        }
 
index e0fdc42282db79903f0e7d97d19307cb2ad4ee31..21a77d96f711fe13fbe747c76eb1b8f465d313ce 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_MD4
 int main(int argc, char *argv[])
 {
@@ -118,7 +120,7 @@ int main(int argc, char *argv[])
                R++;
                P++;
                }
-       exit(err);
+       EXIT(err);
        return(0);
        }
 
index 862b89658aa2ee78c1e874a0854488aa21da512f..bfd62629ed28391e39e09d5d028a85ab84374c13 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_MD5
 int main(int argc, char *argv[])
 {
@@ -118,7 +120,7 @@ int main(int argc, char *argv[])
                R++;
                P++;
                }
-       exit(err);
+       EXIT(err);
        return(0);
        }
 
index 6db546025d088951dbb668e6f6ecfca8f76a3f3d..c9abe99d9280f37aeb4c94c0b03987a010a4db34 100644 (file)
@@ -60,6 +60,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "../e_os.h"
+
 #if defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_MDC2)
 #define OPENSSL_NO_MDC2
 #endif
@@ -138,7 +140,7 @@ int main(int argc, char *argv[])
                printf("pad2 - ok\n");
 
        EVP_MD_CTX_cleanup(&c);
-       exit(ret);
+       EXIT(ret);
        return(ret);
        }
 #endif
index b64de616dbc84472b16e9b2a791afcfcffd78468..701932e6ee28b0956e04ef2ad80e07c97925e19d 100644 (file)
@@ -60,6 +60,8 @@
 #include <stdlib.h>
 #include <openssl/rand.h>
 
+#include "../e_os.h"
+
 /* some FIPS 140-1 random number test */
 /* some simple tests */
 
@@ -209,6 +211,6 @@ int main()
        printf("test 4 done\n");
  err:
        err=((err)?1:0);
-       exit(err);
+       EXIT(err);
        return(err);
        }
index d9a2a0a1cbd333605380ecd781f200d37bea9df0..b67bafb49f4eaeff9e8fcdd8a85a0bbe09ca55c9 100644 (file)
@@ -63,6 +63,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_RC2
 int main(int argc, char *argv[])
 {
@@ -203,7 +205,7 @@ int main(int argc, char *argv[])
                printf("ok\n");
 #endif
 
-       exit(err);
+       EXIT(err);
        return(err);
        }
 
index a28d457c8d5dec3aaaf7563c8123bb4dad8b0c74..b9d8f209753667b59e483bd90dad2f46eb9c4e49 100644 (file)
@@ -60,6 +60,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_RC4
 int main(int argc, char *argv[])
 {
@@ -195,7 +197,7 @@ int main(int argc, char *argv[])
                        }
                }
        printf("done\n");
-       exit(err);
+       EXIT(err);
        return(0);
        }
 #endif
index f1d4c22bbe079f508fc91359c16d0cc76c14d658..ce3d0cc16f322e1ef346b0d898eeb4d77d48d0ca 100644 (file)
@@ -63,6 +63,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_RC5
 int main(int argc, char *argv[])
 {
@@ -318,7 +320,7 @@ int main(int argc, char *argv[])
                }
        if (err == 0) printf("cbc RC5 ok\n");
 
-       exit(err);
+       EXIT(err);
        return(err);
        }
 
index be1fb8b1f6d200c253b58c0a93c1c43e3c3ecbda..d4c709e64667eb05fb67426b5b034fdfaf105864 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_RIPEMD
 int main(int argc, char *argv[])
 {
@@ -127,7 +129,7 @@ int main(int argc, char *argv[])
                R++;
                P++;
                }
-       exit(err);
+       EXIT(err);
        return(0);
        }
 
index 499a1cf5af0ea80f038173529aafa487263bbcd6..4f2e4ada2d25ea200b84d70b56045584e85e8e91 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_SHA
 int main(int argc, char *argv[])
 {
@@ -155,7 +157,7 @@ int main(int argc, char *argv[])
                }
        else
                printf("test 3 ok\n");
-       exit(err);
+       EXIT(err);
        EVP_MD_CTX_cleanup(&c);
        return(0);
        }
index 331294a74f91f9c81ca504b7461ad40ad6d3c349..5d2b1d3b1aedc2ec49eda3e252774f79f3ee7ac3 100644 (file)
@@ -60,6 +60,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "../e_os.h"
+
 #ifdef OPENSSL_NO_SHA
 int main(int argc, char *argv[])
 {
@@ -156,7 +158,7 @@ int main(int argc, char *argv[])
        else
                printf("test 3 ok\n");
        EVP_MD_CTX_cleanup(&c);
-       exit(err);
+       EXIT(err);
        return(0);
        }
 
index fbdd2a9c41ec2641f8810b2af1d18e4efc72f255..533c09825d6ed95dbd1e30c383aecd601824869c 100644 (file)
@@ -564,7 +564,7 @@ bad:
                        "the test anyway (and\n-d to see what happens), "
                        "or add one of -ssl2, -ssl3, -tls1, -reuse\n"
                        "to avoid protocol mismatch.\n");
-               exit(1);
+               EXIT(1);
                }
 
        if (print_time)
index 06ccb3b31087a9fdeaa3d8ba7f1dc6a5ebb3f976..005c2f48220e8d4e4390b801289ec9458aee1f10 100644 (file)
@@ -96,10 +96,10 @@ char *argv[];
        METH_init(top);
        METH_control(tmp1,METH_CONTROL_DUMP,stdout);
        METH_control(tmp2,METH_CONTROL_DUMP,stdout);
-       exit(0);
+       EXIT(0);
 err:
        ERR_load_crypto_strings();
        ERR_print_errors_fp(stderr);
-       exit(1);
+       EXIT(1);
        return(0);
        }