diff options
author | Bodo Möller <bodo@openssl.org> | 2002-09-23 14:25:07 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-09-23 14:25:07 +0000 |
commit | e78f137899af768e1e9335f080826dc9f18eb882 (patch) | |
tree | 326bcc580219a9f1751801249c5c7c442c1bb904 /ssl/s3_srvr.c | |
parent | 40e66398dbe7f5e9ff6984ff0b2f92d0f151995e (diff) |
really fix race condition
PR: 262
Diffstat (limited to 'ssl/s3_srvr.c')
-rw-r--r-- | ssl/s3_srvr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 4b374a9cd6..7742f3b8bc 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -181,11 +181,15 @@ SSL_METHOD *SSLv3_server_method(void) if (init) { + CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); + memcpy((char *)&SSLv3_server_data,(char *)sslv3_base_method(), sizeof(SSL_METHOD)); SSLv3_server_data.ssl_accept=ssl3_accept; SSLv3_server_data.get_ssl_method=ssl3_get_server_method; init=0; + + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } return(&SSLv3_server_data); } |