diff options
author | Riccardo Spagni <ric@spagni.net> | 2014-12-04 23:10:49 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-12-04 23:10:49 +0200 |
commit | 831933425b3406310e70476dc56e822f7ae3c549 (patch) | |
tree | bd05c1b54f8cff8ef0bc1f769a22232172ec2a96 /external/unbound/util/net_help.c | |
parent | increased version number for tagged release (diff) | |
download | monero-831933425b3406310e70476dc56e822f7ae3c549.tar.xz |
update unbound from upstream
Diffstat (limited to 'external/unbound/util/net_help.c')
-rw-r--r-- | external/unbound/util/net_help.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/external/unbound/util/net_help.c b/external/unbound/util/net_help.c index 30d543e00..8c2bac737 100644 --- a/external/unbound/util/net_help.c +++ b/external/unbound/util/net_help.c @@ -613,12 +613,17 @@ void* listen_sslctx_create(char* key, char* pem, char* verifypem) log_crypto_err("could not SSL_CTX_new"); return NULL; } - /* no SSLv2 because has defects */ + /* no SSLv2, SSLv3 because has defects */ if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)){ log_crypto_err("could not set SSL_OP_NO_SSLv2"); SSL_CTX_free(ctx); return NULL; } + if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)){ + log_crypto_err("could not set SSL_OP_NO_SSLv3"); + SSL_CTX_free(ctx); + return NULL; + } if(!SSL_CTX_use_certificate_file(ctx, pem, SSL_FILETYPE_PEM)) { log_err("error for cert file: %s", pem); log_crypto_err("error in SSL_CTX use_certificate_file"); @@ -668,6 +673,11 @@ void* connect_sslctx_create(char* key, char* pem, char* verifypem) SSL_CTX_free(ctx); return NULL; } + if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)) { + log_crypto_err("could not set SSL_OP_NO_SSLv3"); + SSL_CTX_free(ctx); + return NULL; + } if(key && key[0]) { if(!SSL_CTX_use_certificate_file(ctx, pem, SSL_FILETYPE_PEM)) { log_err("error in client certificate %s", pem); @@ -689,7 +699,7 @@ void* connect_sslctx_create(char* key, char* pem, char* verifypem) } } if(verifypem && verifypem[0]) { - if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL) != 1) { + if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) { log_crypto_err("error in SSL_CTX verify"); SSL_CTX_free(ctx); return NULL; |