X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs2_meth.c;h=deb9e1d6f36c316fdd1b005916c74540a05130e4;hp=cfc8828cc7185e85cee6d71c87cc36558393d5e1;hb=c11dead17c0808e1a312ca02a849ed5cdd74c535;hpb=78414a6a897db42c9bcf06aa21c705811ab33921 diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c index cfc8828cc7..deb9e1d6f3 100644 --- a/ssl/s2_meth.c +++ b/ssl/s2_meth.c @@ -56,12 +56,13 @@ * [including the GNU Public Licence.] */ -#include -#include "objects.h" #include "ssl_locl.h" +#ifndef NO_SSL2 +#include +#include -static SSL_METHOD *ssl2_get_method(ver) -int ver; +static SSL_METHOD *ssl2_get_method(int ver); +static SSL_METHOD *ssl2_get_method(int ver) { if (ver == SSL2_VERSION) return(SSLv2_method()); @@ -69,20 +70,26 @@ int ver; return(NULL); } -SSL_METHOD *SSLv2_method() +SSL_METHOD *SSLv2_method(void) { static int init=1; static SSL_METHOD SSLv2_data; if (init) { - init=0; memcpy((char *)&SSLv2_data,(char *)sslv2_base_method(), sizeof(SSL_METHOD)); SSLv2_data.ssl_connect=ssl2_connect; SSLv2_data.ssl_accept=ssl2_accept; SSLv2_data.get_ssl_method=ssl2_get_method; + init=0; } return(&SSLv2_data); } +#else /* !NO_SSL2 */ + +# if PEDANTIC +static void *dummy=&dummy; +# endif +#endif