]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix a bug in create_ssl_ctx_pair()
authorMatt Caswell <matt@openssl.org>
Fri, 27 Apr 2018 11:09:08 +0000 (12:09 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 2 May 2018 22:30:47 +0000 (23:30 +0100)
The max protocol version was only being set on the server side. It should
have been done on both the client and the server.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6113)

test/ssltestlib.c

index ebd87cc7f0f6fd512e67ef3e7e9da0c88c541332..959e3296a84efa9525ccc4f613e682bce2654265 100644 (file)
@@ -531,10 +531,10 @@ int create_ssl_ctx_pair(const SSL_METHOD *sm, const SSL_METHOD *cm,
         goto err;
     if (clientctx != NULL
         && ((min_proto_version > 0
-             && !TEST_true(SSL_CTX_set_min_proto_version(serverctx,
+             && !TEST_true(SSL_CTX_set_min_proto_version(clientctx,
                                                          min_proto_version)))
             || (max_proto_version > 0
-                && !TEST_true(SSL_CTX_set_max_proto_version(serverctx,
+                && !TEST_true(SSL_CTX_set_max_proto_version(clientctx,
                                                             max_proto_version)))))
         goto err;