]> granicus.if.org Git - icinga2/commitdiff
Use the server's preferred cipher for the API connection
authorTobias von der Krone <tobias.vonderkrone@profitbricks.com>
Fri, 4 Mar 2016 07:14:03 +0000 (08:14 +0100)
committerTobias von der Krone <tobias.vonderkrone@profitbricks.com>
Fri, 4 Mar 2016 13:57:06 +0000 (14:57 +0100)
When using SSL_OP_CIPHER_SERVER_PREFERENCE the server's preferred cipher
is used instead of the client preference, see
https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_options.html

fixes #11290

lib/base/tlsutility.cpp

index 5040013cc8601da2e79c4d925845c08c0e9d8557..e43596272534acc2f4c955acc5455c255cea9abf 100644 (file)
@@ -85,7 +85,7 @@ boost::shared_ptr<SSL_CTX> MakeSSLContext(const String& pubkey, const String& pr
 
        boost::shared_ptr<SSL_CTX> sslContext = boost::shared_ptr<SSL_CTX>(SSL_CTX_new(SSLv23_method()), SSL_CTX_free);
 
-       long flags = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
+       long flags = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_CIPHER_SERVER_PREFERENCE;
 
 #ifdef SSL_OP_NO_COMPRESSION
        flags |= SSL_OP_NO_COMPRESSION;