#undef FIONBIO
#endif
-#if defined(NO_RSA) && !defined(NO_SSL2)
-#define NO_SSL2
-#endif
-
#undef PROG
#define PROG s_client_main
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
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)
}
SSLeay_add_ssl_algorithms();
+ SSL_load_error_strings();
ctx=SSL_CTX_new(meth);
if (ctx == NULL)
{
if (state) SSL_CTX_set_info_callback(ctx,apps_ssl_info_callback);
if (cipher != NULL)
- SSL_CTX_set_cipher_list(ctx,cipher);
+ if(!SSL_CTX_set_cipher_list(ctx,cipher)) {
+ BIO_printf(bio_err,"error seting cipher list\n");
+ ERR_print_errors(bio_err);
+ goto end;
+ }
#if 0
else
SSL_CTX_set_cipher_list(ctx,getenv("SSL_CIPHER"));
/* goto end; */
}
- SSL_load_error_strings();
con=(SSL *)SSL_new(ctx);
/* SSL_set_cipher_list(con,"RC4-MD5"); */
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);