From 962fea87d34a9be11e9a8684cd66a8b441384c7c Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 29 Jun 2017 11:53:21 +0000 Subject: [PATCH] lint fix and check errcode. git-svn-id: file:///svn/unbound/trunk@4256 be551aaa-1e26-0410-a405-d3ace91eadb9 --- util/net_help.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/util/net_help.c b/util/net_help.c index 9d532852b..621c02634 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -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); -- 2.47.3