X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Ft1_meth.c;h=888ea3e6a8e7a878ba5fb93cbcde54b2668548ca;hp=512c2078e763740c939fa46ee9ea5f2988e3054c;hb=5cc146f344bd2225e7afa66052a8401468b94ef4;hpb=7dfb0b774e6592dcbfe47015168a0ac8b44e2a17 diff --git a/ssl/t1_meth.c b/ssl/t1_meth.c index 512c2078e7..888ea3e6a8 100644 --- a/ssl/t1_meth.c +++ b/ssl/t1_meth.c @@ -60,8 +60,13 @@ #include "objects.h" #include "ssl_locl.h" -static SSL_METHOD *tls1_get_method(ver) -int ver; +#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) return(TLSv1_method()); @@ -69,19 +74,19 @@ int ver; return(NULL); } -SSL_METHOD *TLSv1_method() +SSL_METHOD *TLSv1_method(void) { static int init=1; static SSL_METHOD TLSv1_data; if (init) { - init=0; 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); }