diff options
Diffstat (limited to 'ssl/t1_srvr.c')
-rw-r--r-- | ssl/t1_srvr.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ssl/t1_srvr.c b/ssl/t1_srvr.c index c72e5525ae..1c1149e49f 100644 --- a/ssl/t1_srvr.c +++ b/ssl/t1_srvr.c @@ -82,12 +82,15 @@ SSL_METHOD *TLSv1_server_method(void) { CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); - memcpy((char *)&TLSv1_server_data,(char *)tlsv1_base_method(), - sizeof(SSL_METHOD)); - TLSv1_server_data.ssl_accept=ssl3_accept; - TLSv1_server_data.get_ssl_method=tls1_get_server_method; - init=0; - + if (init) + { + memcpy((char *)&TLSv1_server_data,(char *)tlsv1_base_method(), + sizeof(SSL_METHOD)); + TLSv1_server_data.ssl_accept=ssl3_accept; + TLSv1_server_data.get_ssl_method=tls1_get_server_method; + init=0; + } + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } return(&TLSv1_server_data); |