X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs3_srvr.c;h=59ff27138145ba777b2a8d7c7547858170e3f348;hp=e71089840242e11a8c3cd6ab41db8e61f46e284b;hb=7fc5f4f11782494d620a752ecfb0cb8867e80860;hpb=249a3e362fe406f8bc05cd3e69955a34a080b2b9 diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index e710898402..59ff271381 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1051,7 +1051,16 @@ int ssl3_get_client_hello(SSL *s) else { i=ssl_get_prev_session(s, p, j, d + n); - if (i == 1) + /* + * Only resume if the session's version matches the negotiated + * version. + * RFC 5246 does not provide much useful advice on resumption + * with a different protocol version. It doesn't forbid it but + * the sanity of such behaviour would be questionable. + * In practice, clients do not accept a version mismatch and + * will abort the handshake with an error. + */ + if (i == 1 && s->version == s->session->ssl_version) { /* previous session */ s->hit=1; }