X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs3_meth.c;h=cdddb17b627d775dc65f6e5f77810d9f36ecf628;hp=4762b214421fa014c22bf4af939b0aacc05e957f;hb=5693a30813a031d3921a016a870420e7eb93ec90;hpb=b7896b3cb86d80206af14a14d69b0717786f2729 diff --git a/ssl/s3_meth.c b/ssl/s3_meth.c index 4762b21442..cdddb17b62 100644 --- a/ssl/s3_meth.c +++ b/ssl/s3_meth.c @@ -1,5 +1,5 @@ /* ssl/s3_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 @@ -57,32 +57,21 @@ */ #include -#include "objects.h" +#include #include "ssl_locl.h" -static SSL_METHOD *ssl3_get_method(ver) -int ver; +static const SSL_METHOD *ssl3_get_method(int ver); +static const SSL_METHOD *ssl3_get_method(int ver) { - if (ver == 3) + if (ver == SSL3_VERSION) return(SSLv3_method()); - else + else return(NULL); } -SSL_METHOD *SSLv3_method() - { - static int init=1; - static SSL_METHOD SSLv3_data; +IMPLEMENT_ssl3_meth_func(SSLv3_method, + ssl3_accept, + ssl3_connect, + ssl3_get_method) - if (init) - { - init=0; - memcpy((char *)&SSLv3_data,(char *)sslv3_base_method(), - sizeof(SSL_METHOD)); - SSLv3_data.ssl_connect=ssl3_connect; - SSLv3_data.ssl_accept=ssl3_accept; - SSLv3_data.get_ssl_method=ssl3_get_method; - } - return(&SSLv3_data); - }