Fix SSL_OP_SINGLE_ECDH_USE
[openssl.git] / ssl / t1_meth.c
index f5d8df6..5162678 100644 (file)
 #include <openssl/objects.h>
 #include "ssl_locl.h"
 
-static SSL_METHOD *tls1_get_method(int ver);
-static 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)