]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
lint fix and check errcode.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 29 Jun 2017 11:53:21 +0000 (11:53 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 29 Jun 2017 11:53:21 +0000 (11:53 +0000)
git-svn-id: file:///svn/unbound/trunk@4256 be551aaa-1e26-0410-a405-d3ace91eadb9

util/net_help.c

index 9d532852b391c9bdf2f0595670bcf7768807ae3a..621c02634c5e34220cdb7ca0a3245258d2765e32 100644 (file)
@@ -647,7 +647,12 @@ listen_sslctx_setup(void* ctxt)
                log_crypto_err("could not set cipher list with SSL_CTX_set_cipher_list");
 #endif
 
-       SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
+       if((SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE) &
+               SSL_OP_CIPHER_SERVER_PREFERENCE) !=
+               SSL_OP_CIPHER_SERVER_PREFERENCE) {
+               log_crypto_err("could not set SSL_OP_CIPHER_SERVER_PREFERENCE");
+               return 0;
+       }
 
 #ifdef HAVE_SSL_CTX_SET_SECURITY_LEVEL
        SSL_CTX_set_security_level(ctx, 0);