]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
OpenSSL: Always set SSL_OP_CIPHER_SERVER_PREFERENCE flag
authorSzilárd Pfeiffer <coroner@pfeifferszilard.hu>
Mon, 4 Sep 2017 08:10:12 +0000 (10:10 +0200)
committerDavid Sommerseth <davids@openvpn.net>
Wed, 6 Sep 2017 22:10:24 +0000 (00:10 +0200)
* safe bet to say that server admins are better at updating their configs
  than client users are and if client do want to restrict their ciphers,
  they should simply evict the ciphers they don't want from their cipher
  suite
* mbed TLS and OpenSSL behave more similar with the
  SSL_OP_CIPHER_SERVER_PREFERENCE flag

Signed-off-by: Szilárd Pfeiffer <coroner@pfeifferszilard.hu>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20170904081012.1975-1-coroner@pfeifferszilard.hu>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15356.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
src/openvpn/ssl_openssl.c

index 597c62d85c3ebe3dd58be61e17bc41eec7e232a2..92a662b5a8578b21c5e626805a3ad4a508b7b563 100644 (file)
@@ -252,6 +252,9 @@ tls_ctx_set_options(struct tls_root_ctx *ctx, unsigned int ssl_flags)
         {
             sslopt |= SSL_OP_NO_TLSv1_2;
         }
+#endif
+#ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
+        sslopt |= SSL_OP_CIPHER_SERVER_PREFERENCE;
 #endif
         sslopt |= SSL_OP_NO_COMPRESSION;
         SSL_CTX_set_options(ctx->ctx, sslopt);