From: Adam Langley Date: Sat, 13 Dec 2014 20:13:10 +0000 (+0000) Subject: Don't set client_version to the ServerHello version. X-Git-Tag: OpenSSL_1_0_2~131 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=63ef0db60f7b9fc0c2bcabdc7e2bd133784ddd60;p=oweals%2Fopenssl.git Don't set client_version to the ServerHello version. The client_version needs to be preserved for the RSA key exchange. This change also means that renegotiation will, like TLS, repeat the old client_version rather than advertise only the final version. (Either way, version change on renego is not allowed.) This is necessary in TLS to work around an SChannel bug, but it's not strictly necessary in DTLS. (From BoringSSL) Reviewed-by: Emilia Käsper (cherry picked from commit ec1af3c4195c1dfecdd9dc7458850ab1b8b951e0) --- diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index c9b5ee1831..b16b3c44c0 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -941,7 +941,7 @@ int ssl3_get_server_hello(SSL *s) al = SSL_AD_PROTOCOL_VERSION; goto f_err; } - s->version = s->client_version = s->method->version; + s->version = s->method->version; } if ((p[0] != (s->version>>8)) || (p[1] != (s->version&0xff)))