diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-05-12 02:18:41 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-05-12 02:18:41 +0000 |
commit | b47e6f30e82ff649c06cdfcf587a4ad9d127a4f5 (patch) | |
tree | f98b2f00f52dd4fd004708bd26d63f3c24a78355 /lib/libssl/t1_meth.c | |
parent | f97744c656f2a5c7d4e42bcaba08dbe146a49425 (diff) |
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'lib/libssl/t1_meth.c')
-rw-r--r-- | lib/libssl/t1_meth.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/libssl/t1_meth.c b/lib/libssl/t1_meth.c index 9bb36a7d1ca..fcc243f7826 100644 --- a/lib/libssl/t1_meth.c +++ b/lib/libssl/t1_meth.c @@ -76,13 +76,21 @@ SSL_METHOD *TLSv1_method(void) if (init) { - memcpy((char *)&TLSv1_data,(char *)tlsv1_base_method(), - sizeof(SSL_METHOD)); - TLSv1_data.ssl_connect=ssl3_connect; - TLSv1_data.ssl_accept=ssl3_accept; - TLSv1_data.get_ssl_method=tls1_get_method; - init=0; + CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD); + + if (init) + { + memcpy((char *)&TLSv1_data,(char *)tlsv1_base_method(), + sizeof(SSL_METHOD)); + TLSv1_data.ssl_connect=ssl3_connect; + TLSv1_data.ssl_accept=ssl3_accept; + TLSv1_data.get_ssl_method=tls1_get_method; + init=0; + } + + CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD); } + return(&TLSv1_data); } |