diff options
author | beck <> | 2018-03-17 16:20:01 +0000 |
---|---|---|
committer | beck <> | 2018-03-17 16:20:01 +0000 |
commit | d18ae25f28e72831dc3c51f78e0735342540098b (patch) | |
tree | 12cc674e7652f4d67e57ec9e1882e6e824b4808d /src/lib/libssl/ssl_lib.c | |
parent | 736fdc7bedf7fe8b17717032f7380c5c6e247d0d (diff) | |
download | openbsd-d18ae25f28e72831dc3c51f78e0735342540098b.tar.gz openbsd-d18ae25f28e72831dc3c51f78e0735342540098b.tar.bz2 openbsd-d18ae25f28e72831dc3c51f78e0735342540098b.zip |
Bring in compatibility for OpenSSL 1.1 style init functions.
This adds OPENSSL_init_crypto and OPENSSL_init_ssl, as well
thread safety modifications for the existing LibreSSL init
functions. The initialization routines are called automatically
by the normal entry points into the library, as in newer OpenSSL
ok jsing@, nits by tb@ and deraadt@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index eca3c97fac..573e63c934 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.181 2018/03/17 15:48:31 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.182 2018/03/17 16:20:01 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -1791,6 +1791,11 @@ SSL_CTX_new(const SSL_METHOD *meth) | |||
1791 | { | 1791 | { |
1792 | SSL_CTX *ret; | 1792 | SSL_CTX *ret; |
1793 | 1793 | ||
1794 | if (!OPENSSL_init_ssl(0, NULL)) { | ||
1795 | SSLerrorx(SSL_R_LIBRARY_BUG); | ||
1796 | return (NULL); | ||
1797 | } | ||
1798 | |||
1794 | if (meth == NULL) { | 1799 | if (meth == NULL) { |
1795 | SSLerrorx(SSL_R_NULL_SSL_METHOD_PASSED); | 1800 | SSLerrorx(SSL_R_NULL_SSL_METHOD_PASSED); |
1796 | return (NULL); | 1801 | return (NULL); |