X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=ssl%2Ft1_meth.c;h=f5d8df634ee1dbfce815a07d3cdee968fb02ee2e;hb=0b8cd5acd6616888a3cde85d6127c93894dfe797;hp=2632773895108232776fd57bdca92f0df80992b5;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a;p=oweals%2Fopenssl.git diff --git a/ssl/t1_meth.c b/ssl/t1_meth.c index 2632773895..f5d8df634e 100644 --- a/ssl/t1_meth.c +++ b/ssl/t1_meth.c @@ -60,12 +60,7 @@ #include #include "ssl_locl.h" -#ifndef NOPROTO static SSL_METHOD *tls1_get_method(int ver); -#else -static SSL_METHOD *tls1_get_method(); -#endif - static SSL_METHOD *tls1_get_method(int ver) { if (ver == TLS1_VERSION) @@ -74,20 +69,8 @@ static SSL_METHOD *tls1_get_method(int ver) return(NULL); } -SSL_METHOD *TLSv1_method(void) - { - static int init=1; - static SSL_METHOD TLSv1_data; - - if (init) - { - memcpy((char *)&TLSv1_data,(char *)tlsv1_base_method(), - sizeof(SSL_METHOD)); - TLSv1_data.ssl_connect=ssl3_connect; - TLSv1_data.ssl_accept=ssl3_accept; - TLSv1_data.get_ssl_method=tls1_get_method; - init=0; - } - return(&TLSv1_data); - } +IMPLEMENT_tls1_meth_func(TLSv1_method, + ssl3_accept, + ssl3_connect, + tls1_get_method)