X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs2_meth.c;h=deb9e1d6f36c316fdd1b005916c74540a05130e4;hp=0b8c2acb48333003453a5f8215ffb858c2417515;hb=3ac82faae5eb02140f347610be0726f549a0aa0a;hpb=d02b48c63a58ea4367a0e905979f140b7d090f86 diff --git a/ssl/s2_meth.c b/ssl/s2_meth.c index 0b8c2acb48..deb9e1d6f3 100644 --- a/ssl/s2_meth.c +++ b/ssl/s2_meth.c @@ -1,5 +1,5 @@ /* ssl/s2_meth.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -56,33 +56,40 @@ * [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 == 2) + if (ver == SSL2_VERSION) return(SSLv2_method()); else 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