diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-01-23 02:28:08 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-01-23 02:28:08 +0000 |
commit | fabce04122b1e6a208577c06927b25595d5b5613 (patch) | |
tree | 078434f8ee89519b445ab28c058a959b4799d500 /apps | |
parent | 64287002ce4de3c8954a8bc9ccf6e82df695b69f (diff) |
Make s_server, s_client check cipher list return codes.
Update docs.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_client.c | 8 | ||||
-rw-r--r-- | apps/s_server.c | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index 84a475d7b8..c9b52e6a99 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -338,6 +338,7 @@ bad: } SSLeay_add_ssl_algorithms(); + SSL_load_error_strings(); ctx=SSL_CTX_new(meth); if (ctx == NULL) { @@ -352,7 +353,11 @@ bad: 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")); @@ -370,7 +375,6 @@ bad: /* goto end; */ } - SSL_load_error_strings(); con=(SSL *)SSL_new(ctx); /* SSL_set_cipher_list(con,"RC4-MD5"); */ diff --git a/apps/s_server.c b/apps/s_server.c index ff0354acc8..bbb651b6ea 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -697,7 +697,11 @@ bad: #endif 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; + } SSL_CTX_set_verify(ctx,s_server_verify,verify_callback); SSL_CTX_set_session_id_context(ctx,(void*)&s_server_session_id_context, sizeof s_server_session_id_context); |