X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs3_meth.c;h=6b39ce89f60e8a6ab916d30f04980793c828f43a;hp=4762b214421fa014c22bf4af939b0aacc05e957f;hb=2aed84d16b6cc1b7ea95edc4e1478b76944fc3c9;hpb=b7896b3cb86d80206af14a14d69b0717786f2729 diff --git a/ssl/s3_meth.c b/ssl/s3_meth.c index 4762b21442..6b39ce89f6 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); - }