X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=ssl%2Ft1_clnt.c;h=578617ed84b47f4a361126553d5d99d0c26d26e0;hb=a240ea8ab840e642eec35d416cd1cf06cbf74eee;hp=4d1e198cdcde1ec6c04eb47e9a76d9b11d567d93;hpb=f3b656b246f45a0159aea9c38634a9f72f98d31d;p=oweals%2Fopenssl.git diff --git a/ssl/t1_clnt.c b/ssl/t1_clnt.c index 4d1e198cdc..578617ed84 100644 --- a/ssl/t1_clnt.c +++ b/ssl/t1_clnt.c @@ -63,16 +63,29 @@ #include #include -static SSL_METHOD *tls1_get_client_method(int ver); -static SSL_METHOD *tls1_get_client_method(int ver) +static const SSL_METHOD *tls1_get_client_method(int ver); +static const SSL_METHOD *tls1_get_client_method(int ver) { + if (ver == TLS1_2_VERSION) + return TLSv1_2_client_method(); + if (ver == TLS1_1_VERSION) + return TLSv1_1_client_method(); if (ver == TLS1_VERSION) - return(TLSv1_client_method()); - else - return(NULL); + return TLSv1_client_method(); + return NULL; } -IMPLEMENT_tls1_meth_func(TLSv1_client_method, +IMPLEMENT_tls_meth_func(TLS1_2_VERSION, TLSv1_2_client_method, + ssl_undefined_function, + ssl3_connect, + tls1_get_client_method) + +IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_client_method, + ssl_undefined_function, + ssl3_connect, + tls1_get_client_method) + +IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_client_method, ssl_undefined_function, ssl3_connect, tls1_get_client_method)