summaryrefslogtreecommitdiffstats
path: root/test/ssltestlib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-04-27 12:09:08 +0100
committerMatt Caswell <matt@openssl.org>2018-05-02 23:30:47 +0100
commit6021d8ec5affe07116cdae81fa3db81d67996aac (patch)
tree30861242918e3ce942664e97c12b148684714095 /test/ssltestlib.c
parent3bfa4756bd02659fa9f9a265550862c562749db6 (diff)
Fix a bug in create_ssl_ctx_pair()
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)
Diffstat (limited to 'test/ssltestlib.c')
-rw-r--r--test/ssltestlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ssltestlib.c b/test/ssltestlib.c
index ebd87cc7f0..959e3296a8 100644
--- a/test/ssltestlib.c
+++ b/test/ssltestlib.c
@@ -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;