summaryrefslogtreecommitdiffstats
path: root/ssl/s23_clnt.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-08-05 13:33:52 +0100
committerMatt Caswell <matt@openssl.org>2015-09-02 00:31:33 +0100
commitdd642deea83d0f5b4accee9855e36c36699653cc (patch)
tree62771369945c7102db23ef7ba8882991eaf268d0 /ssl/s23_clnt.c
parent927f7a870337157bbb9e7a7d32578eeedb90ddbb (diff)
Fix session resumption
Commit f0348c842e7 introduced a problem with session resumption. The version for the session is fixed when the session is created. By moving the creation of the session earlier in the process the version is fixed *before* version negotiation has completed when processing the ServerHello on the client side. This fix updates the session version after version neg has completed. Reviewed-by: Emilia Käsper <emilia@openssl.org> (cherry picked from commit dc0c888811cebfa2d21c844be0d81335fb2361da)
Diffstat (limited to 'ssl/s23_clnt.c')
-rw-r--r--ssl/s23_clnt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c
index fc344b92ec..2b2855dee4 100644
--- a/ssl/s23_clnt.c
+++ b/ssl/s23_clnt.c
@@ -727,6 +727,8 @@ static int ssl23_get_server_hello(SSL *s)
goto err;
}
+ s->session->ssl_version = s->version;
+
/* ensure that TLS_MAX_VERSION is up-to-date */
OPENSSL_assert(s->version <= TLS_MAX_VERSION);