diff options
author | tb <> | 2023-11-22 15:53:53 +0000 |
---|---|---|
committer | tb <> | 2023-11-22 15:53:53 +0000 |
commit | 1583f08c4441aba39b088e4c57878f02431b5798 (patch) | |
tree | 64cd654c9c27175595ff5b7ada41630953d53089 /src/lib/libssl/ssl_init.c | |
parent | 4c0a26334ce1124fb6f4671a6e30c9ac2b1e2d12 (diff) | |
download | openbsd-1583f08c4441aba39b088e4c57878f02431b5798.tar.gz openbsd-1583f08c4441aba39b088e4c57878f02431b5798.tar.bz2 openbsd-1583f08c4441aba39b088e4c57878f02431b5798.zip |
Make SSL_library_init() a wrapper of OPENSSL_init_ssl()
This way it doesn't do nonsensical work for all those who cargo culted an
init sequence. There's no point in having SSL_library_init() as a cheaper
version of OPENSSL_init_ssl(): once you do crypto, you'll init crypto...
Also move the now trivial implementation to ssl_init.c which has a good
license.
ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_init.c')
-rw-r--r-- | src/lib/libssl/ssl_init.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_init.c b/src/lib/libssl/ssl_init.c index 7df48fb6a0..b314e714c1 100644 --- a/src/lib/libssl/ssl_init.c +++ b/src/lib/libssl/ssl_init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_init.c,v 1.5 2023/11/22 15:49:47 tb Exp $ */ | 1 | /* $OpenBSD: ssl_init.c,v 1.6 2023/11/22 15:53:53 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2018 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -26,6 +26,13 @@ | |||
26 | 26 | ||
27 | static pthread_t ssl_init_thread; | 27 | static pthread_t ssl_init_thread; |
28 | 28 | ||
29 | int | ||
30 | SSL_library_init(void) | ||
31 | { | ||
32 | return OPENSSL_init_ssl(0, NULL); | ||
33 | } | ||
34 | LSSL_ALIAS(SSL_library_init); | ||
35 | |||
29 | static void | 36 | static void |
30 | OPENSSL_init_ssl_internal(void) | 37 | OPENSSL_init_ssl_internal(void) |
31 | { | 38 | { |