[PR3597] Advance to the next state variant when reusing messages.
[openssl.git] / ssl / t1_meth.c
index 6ce7c0bbf5856f6bcf0fd56a9c2dbeafded4f0cc..51626783588fa026bce7d3ebee2a831f2cc32a0a 100644 (file)
 #include <openssl/objects.h>
 #include "ssl_locl.h"
 
-static const SSL_METHOD *tls1_get_method(int ver);
 static const SSL_METHOD *tls1_get_method(int ver)
        {
+       if (ver == TLS1_2_VERSION)
+               return TLSv1_2_method();
+       if (ver == TLS1_1_VERSION)
+               return TLSv1_1_method();
        if (ver == TLS1_VERSION)
-               return(TLSv1_method());
-       else
-               return(NULL);
+               return TLSv1_method();
+       return NULL;
        }
 
-IMPLEMENT_tls1_meth_func(TLSv1_method,
+IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_method,
                        ssl3_accept,
                        ssl3_connect,
-                       tls1_get_method)
+                       tls1_get_method,
+                       TLSv1_2_enc_data)
+
+IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_method,
+                       ssl3_accept,
+                       ssl3_connect,
+                       tls1_get_method,
+                       TLSv1_1_enc_data)
+
+IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_method,
+                       ssl3_accept,
+                       ssl3_connect,
+                       tls1_get_method,
+                       TLSv1_enc_data)