diff options
author | Bodo Möller <bodo@openssl.org> | 2002-09-23 16:25:07 +0200 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-09-23 16:25:07 +0200 |
commit | e78f137899af768e1e9335f080826dc9f18eb882 (patch) | |
tree | 326bcc580219a9f1751801249c5c7c442c1bb904 /ssl/s2_srvr.c | |
parent | use OPENSSL_SYS_MSDOS rather than __DJGPP__ to disable egd, this is not (diff) | |
download | openssl-e78f137899af768e1e9335f080826dc9f18eb882.tar.xz openssl-e78f137899af768e1e9335f080826dc9f18eb882.zip |
really fix race condition
PR: 262
Diffstat (limited to 'ssl/s2_srvr.c')
-rw-r--r-- | ssl/s2_srvr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index 97dda2dde0..d64d4e1ede 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -145,11 +145,15 @@ SSL_METHOD *SSLv2_server_method(void) if (init) { + CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); + memcpy((char *)&SSLv2_server_data,(char *)sslv2_base_method(), sizeof(SSL_METHOD)); SSLv2_server_data.ssl_accept=ssl2_accept; SSLv2_server_data.get_ssl_method=ssl2_get_server_method; init=0; + + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } return(&SSLv2_server_data); } |