summaryrefslogtreecommitdiff
path: root/ssl/s2_clnt.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-08-05 23:56:11 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-08-05 23:56:11 +0000
commitf3b656b246f45a0159aea9c38634a9f72f98d31d (patch)
treeccff70185528b91ee93c7e4be53ed411e4edad5b /ssl/s2_clnt.c
parent53b38d37a90ad53962b9e0f14eb942fa6ab8f341 (diff)
downloadopenssl-new-f3b656b246f45a0159aea9c38634a9f72f98d31d.tar.gz
Initialize SSL_METHOD structures at compile time. This removes the need
for locking code. The CRYPTO_LOCK_SSL_METHOD lock is now no longer used.
Diffstat (limited to 'ssl/s2_clnt.c')
-rw-r--r--ssl/s2_clnt.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c
index 33ea7592c4..0c9e24d5c4 100644
--- a/ssl/s2_clnt.c
+++ b/ssl/s2_clnt.c
@@ -137,28 +137,10 @@ static SSL_METHOD *ssl2_get_client_method(int ver)
return(NULL);
}
-SSL_METHOD *SSLv2_client_method(void)
- {
- static int init=1;
- static SSL_METHOD SSLv2_client_data;
-
- if (init)
- {
- CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
-
- if (init)
- {
- memcpy((char *)&SSLv2_client_data,(char *)sslv2_base_method(),
- sizeof(SSL_METHOD));
- SSLv2_client_data.ssl_connect=ssl2_connect;
- SSLv2_client_data.get_ssl_method=ssl2_get_client_method;
- init=0;
- }
-
- CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
- }
- return(&SSLv2_client_data);
- }
+IMPLEMENT_ssl2_meth_func(SSLv2_client_method,
+ ssl_undefined_function,
+ ssl2_connect,
+ ssl2_get_client_method)
int ssl2_connect(SSL *s)
{