Add missing #ifndefs that caused missing symbols when building libssl
[openssl.git] / apps / s_client.c
index 0afd7907a1fdb8723afc9b6104835e1a62a9448e..84a475d7b8e4a0eaa8c8ec5cc72dc25c54e22067 100644 (file)
@@ -91,10 +91,6 @@ typedef unsigned int u_int;
 #undef FIONBIO
 #endif
 
-#if defined(NO_RSA) && !defined(NO_SSL2)
-#define NO_SSL2
-#endif
-
 #undef PROG
 #define PROG   s_client_main
 
@@ -176,6 +172,7 @@ int MAIN(int argc, char **argv)
        int write_tty,read_tty,write_ssl,read_ssl,tty_on,ssl_pending;
        SSL_CTX *ctx=NULL;
        int ret=1,in_init=1,i,nbio_test=0;
+       int prexit = 0;
        SSL_METHOD *meth=NULL;
        BIO *sbio;
 #ifdef WINDOWS
@@ -245,6 +242,8 @@ int MAIN(int argc, char **argv)
                        if (--argc < 1) goto bad;
                        cert_file= *(++argv);
                        }
+               else if (strcmp(*argv,"-prexit") == 0)
+                       prexit=1;
                else if (strcmp(*argv,"-crlf") == 0)
                        crlf=1;
                else if (strcmp(*argv,"-quiet") == 0)
@@ -735,12 +734,12 @@ shut:
        SHUTDOWN(SSL_get_fd(con));
        ret=0;
 end:
+       if(prexit) print_stuff(bio_c_out,con,1);
        if (con != NULL) SSL_free(con);
        if (con2 != NULL) SSL_free(con2);
        if (ctx != NULL) SSL_CTX_free(ctx);
        if (cbuf != NULL) { memset(cbuf,0,BUFSIZZ); Free(cbuf); }
        if (sbuf != NULL) { memset(sbuf,0,BUFSIZZ); Free(sbuf); }
-       X509_cleanup();
        if (bio_c_out != NULL)
                {
                BIO_free(bio_c_out);