diff options
author | Matt Caswell <matt@openssl.org> | 2018-04-23 17:14:47 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-04-24 09:54:31 +0100 |
commit | 447cc0ad732858f3ab80b2dc52f15fd045b25363 (patch) | |
tree | 734ec9af871268dfcf22c133d123b4dd150db2f2 /ssl | |
parent | ac98d3860206bd31fd484baf163398bfb41e8595 (diff) |
In a reneg use the same client_version we used last time
In 1.0.2 and below we always send the same client_version in a reneg
ClientHello that we sent the first time around, regardless of what
version eventually gets negotiated. According to a comment in
statem_clnt.c this is a workaround for some buggy servers that choked if
we changed the version used in the RSA encrypted premaster secret.
In 1.1.0+ this behaviour no longer occurs. This restores the original
behaviour.
Fixes #1651
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6059)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/statem/statem_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ssl/statem/statem_lib.c b/ssl/statem/statem_lib.c index 269ba85997..49b44433f9 100644 --- a/ssl/statem/statem_lib.c +++ b/ssl/statem/statem_lib.c @@ -2004,6 +2004,13 @@ int ssl_set_client_hello_version(SSL *s) { int ver_min, ver_max, ret; + /* + * In a renegotiation we always send the same client_version that we sent + * last time, regardless of which version we eventually negotiated. + */ + if (!SSL_IS_FIRST_HANDSHAKE(s)) + return 0; + ret = ssl_get_min_max_version(s, &ver_min, &ver_max); if (ret != 0) |