Skip to content

Commit

Permalink
client: reject init_client_ssl more than once
Browse files Browse the repository at this point in the history
  • Loading branch information
lws-team committed Jul 8, 2017
1 parent 7262e14 commit 9b4fa24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ssl-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,9 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
if (!lws_check_opt(info->options, LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT))
return 0;

if (vhost->ssl_client_ctx)
return 0;

if (info->provided_client_ssl_ctx) {
/* use the provided OpenSSL context if given one */
vhost->ssl_client_ctx = info->provided_client_ssl_ctx;
Expand Down

0 comments on commit 9b4fa24

Please sign in to comment.