Move s->s3->wbuf to s->rlayer->wbuf
[openssl.git] / ssl / ssl_asn1.c
index b27e058bc7713959234e194ac6b7988771129f31..dd02b4171a4c53f668cf946df3679e43710079ac 100644 (file)
@@ -410,7 +410,9 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
     os.data = NULL;
     os.length = 0;
     M_ASN1_D2I_get_x(ASN1_OCTET_STRING, osp, d2i_ASN1_OCTET_STRING);
-    if ((ssl_version >> 8) >= SSL3_VERSION_MAJOR) {
+    if ((ssl_version >> 8) == SSL3_VERSION_MAJOR
+        || (ssl_version >> 8) == DTLS1_VERSION_MAJOR
+        || ssl_version == DTLS1_BAD_VER) {
         if (os.length != 2) {
             c.error = SSL_R_CIPHER_CODE_WRONG_LENGTH;
             c.line = __LINE__;
@@ -569,9 +571,7 @@ SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
         OPENSSL_free(ai.data);
         ai.data = NULL;
         ai.length = 0;
-    } else if (ret->tlsext_ticklen && ret->session_id_length)
-        ret->tlsext_tick_lifetime_hint = -1;
-    else
+    } else
         ret->tlsext_tick_lifetime_hint = 0;
     os.length = 0;
     os.data = NULL;