diff options
author | Bodo Möller <bodo@openssl.org> | 2002-09-23 14:28:12 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-09-23 14:28:12 +0000 |
commit | 4e33db9a3f312e06c6697236c550914dd4bd7a04 (patch) | |
tree | 724fc5d0a0c8b19f279ff459d4c5dca3ae5888c3 /ssl/s3_clnt.c | |
parent | ca9a114f7aeedd7db70385433cb40c647e67ba2f (diff) |
really fix race condition
PR: 262
Diffstat (limited to 'ssl/s3_clnt.c')
-rw-r--r-- | ssl/s3_clnt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 4e6c946ec2..59c79d3ae2 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -146,11 +146,15 @@ SSL_METHOD *SSLv3_client_method(void) if (init) { + CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); + memcpy((char *)&SSLv3_client_data,(char *)sslv3_base_method(), sizeof(SSL_METHOD)); SSLv3_client_data.ssl_connect=ssl3_connect; SSLv3_client_data.get_ssl_method=ssl3_get_client_method; init=0; + + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } return(&SSLv3_client_data); } |