Ensure that SSL_dup copies the min/max protocol version
authorMatt Caswell <matt@openssl.org>
Fri, 12 Jun 2020 09:52:41 +0000 (10:52 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 23 Jun 2020 11:46:47 +0000 (12:46 +0100)
With thanks to Rebekah Johnson for reporting this issue.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12180)

ssl/ssl_lib.c

index cee888944d2f3bf273f2d9c33ae21f5eaec407ad..f7544ab402026a81eb788a4b6b9f17bce9f69be5 100644 (file)
@@ -4006,6 +4006,8 @@ SSL *SSL_dup(SSL *s)
         goto err;
     ret->version = s->version;
     ret->options = s->options;
+    ret->min_proto_version = s->min_proto_version;
+    ret->max_proto_version = s->max_proto_version;
     ret->mode = s->mode;
     SSL_set_max_cert_list(ret, SSL_get_max_cert_list(s));
     SSL_set_read_ahead(ret, SSL_get_read_ahead(s));