X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Ft1_srvr.c;h=274a3d6738c7cc2f0856f20b1a2f10cfd336ff8c;hp=56038792845ad03bbfdea8ea9530150953b23d37;hb=0ff907caf88d7f8113991152868739fa4d0bc352;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd diff --git a/ssl/t1_srvr.c b/ssl/t1_srvr.c index 5603879284..274a3d6738 100644 --- a/ssl/t1_srvr.c +++ b/ssl/t1_srvr.c @@ -57,40 +57,30 @@ */ #include -#include "buffer.h" -#include "rand.h" -#include "objects.h" -#include "evp.h" -#include "x509.h" #include "ssl_locl.h" +#include +#include +#include +#include +#include -#ifndef NOPROTO -static SSL_METHOD *tls1_get_server_method(int ver); -#else -static SSL_METHOD *tls1_get_server_method(); -#endif - -static SSL_METHOD *tls1_get_server_method(int ver) +static const SSL_METHOD *tls1_get_server_method(int ver); +static const SSL_METHOD *tls1_get_server_method(int ver) { + if (ver == TLS1_1_VERSION) + return TLSv1_1_server_method(); if (ver == TLS1_VERSION) - return(TLSv1_server_method()); - else - return(NULL); + return TLSv1_server_method(); + return NULL; } -SSL_METHOD *TLSv1_server_method(void) - { - static int init=1; - static SSL_METHOD TLSv1_server_data; +IMPLEMENT_tls_meth_func(TLS1_1_VERSION, TLSv1_1_server_method, + ssl3_accept, + ssl_undefined_function, + tls1_get_server_method) - if (init) - { - init=0; - memcpy((char *)&TLSv1_server_data,(char *)tlsv1_base_method(), - sizeof(SSL_METHOD)); - TLSv1_server_data.ssl_accept=ssl3_accept; - TLSv1_server_data.get_ssl_method=tls1_get_server_method; - } - return(&TLSv1_server_data); - } +IMPLEMENT_tls_meth_func(TLS1_VERSION, TLSv1_server_method, + ssl3_accept, + ssl_undefined_function, + tls1_get_server_method)