Fix DTLS session resumption
[openssl.git] / ssl / s3_clnt.c
index d6f53b0dea846bba4e7e93b37768faea1dfa879f..888fe4f5411815aeb36c2f2fac5139dff40bdeec 100644 (file)
@@ -1036,7 +1036,7 @@ int ssl3_get_server_hello(SSL *s)
             al = SSL_AD_PROTOCOL_VERSION;
             goto f_err;
         }
-        s->version = s->method->version;
+        s->session->ssl_version = s->version = s->method->version;
     } else if ((p[0] != (s->version >> 8)) || (p[1] != (s->version & 0xff))) {
         SSLerr(SSL_F_SSL3_GET_SERVER_HELLO, SSL_R_WRONG_SSL_VERSION);
         s->version = (s->version & 0xff00) | p[1];