Reinitialize global variables when necessary (for monolith application).
authorBodo Möller <bodo@openssl.org>
Fri, 3 Sep 1999 23:08:45 +0000 (23:08 +0000)
committerBodo Möller <bodo@openssl.org>
Fri, 3 Sep 1999 23:08:45 +0000 (23:08 +0000)
apps/ca.c
apps/crl.c
apps/req.c
apps/s_server.c

index 42dc42004529991d2cdb099e3e039ad7425def90..1450c0cfd208164c7c60f0fd8e6f1b11b0a365b8 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -273,9 +273,13 @@ EF_ALIGNMENT=0;
 
        apps_startup();
 
+       key = NULL;
+       section = NULL;
+
        X509V3_add_standard_extensions();
 
        preserve=0;
+       msie_hack=0;
        if (bio_err == NULL)
                if ((bio_err=BIO_new(BIO_s_file())) != NULL)
                        BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
index f7bdf76676c87b224e91d7ee9f8b550bb5ad97ae..e0757d93198e8a09ea355669b75807e7b30142dd 100644 (file)
@@ -250,6 +250,7 @@ bad:
 end:
        BIO_free(out);
        BIO_free(bio_out);
+       bio_out=NULL;
        X509_CRL_free(x);
        X509V3_EXT_cleanup();
        EXIT(ret);
index cc524de8e22d3eea899ae3280b32fd3431a0334b..ce2e190b3932e8f811b1be3e8f878d9180647636 100644 (file)
@@ -152,6 +152,7 @@ int MAIN(int argc, char **argv)
        MS_STATIC char config_name[256];
 #endif
 
+       req_conf = NULL;
 #ifndef NO_DES
        cipher=EVP_des_ede3_cbc();
 #endif
index afe418211b171e36793e4305e3165b45d39e2c69..144dfa662fdc73cd264c46337d13f8a7188ef79c 100644 (file)
@@ -107,7 +107,9 @@ static void print_stats(BIO *bp,SSL_CTX *ctx);
 static DH *load_dh_param(void );
 static DH *get_dh512(void);
 #endif
-/* static void s_server_init(void);*/
+#ifdef MONOLITH
+static void s_server_init(void);
+#endif
 
 #ifndef S_ISDIR
 # if defined(_S_IFMT) && defined(_S_IFDIR)
@@ -175,9 +177,12 @@ static BIO *bio_s_out=NULL;
 static int s_debug=0;
 static int s_quiet=0;
 
-#if 0
+static int hack=0;
+
+#ifdef MONOLITH
 static void s_server_init(void)
        {
+       accept_socket=-1;
        cipher=NULL;
        s_server_verify=SSL_VERIFY_NONE;
        s_dcert_file=NULL;
@@ -194,6 +199,7 @@ static void s_server_init(void)
        bio_s_out=NULL;
        s_debug=0;
        s_quiet=0;
+       hack=0;
        }
 #endif
 
@@ -240,7 +246,6 @@ static void sv_usage(void)
 
 static int local_argc=0;
 static char **local_argv;
-static int hack=0;
 
 #ifdef CHARSET_EBCDIC
 static int ebcdic_new(BIO *bi);
@@ -419,8 +424,9 @@ int MAIN(int argc, char *argv[])
        local_argv=argv;
 
        apps_startup();
-       s_quiet=0;
-       s_debug=0;
+#ifdef MONOLITH
+       s_server_init();
+#endif
 
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);