summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_init.c
diff options
context:
space:
mode:
authortb <>2023-11-22 15:53:53 +0000
committertb <>2023-11-22 15:53:53 +0000
commitdd99b1c3f0090d0daa01069d6bee6a3f9f567970 (patch)
tree64cd654c9c27175595ff5b7ada41630953d53089 /src/lib/libssl/ssl_init.c
parent46117af45e4414aaae9e7f38e9b39e8dc5b548e3 (diff)
downloadopenbsd-dd99b1c3f0090d0daa01069d6bee6a3f9f567970.tar.gz
openbsd-dd99b1c3f0090d0daa01069d6bee6a3f9f567970.tar.bz2
openbsd-dd99b1c3f0090d0daa01069d6bee6a3f9f567970.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.c9
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
27static pthread_t ssl_init_thread; 27static pthread_t ssl_init_thread;
28 28
29int
30SSL_library_init(void)
31{
32 return OPENSSL_init_ssl(0, NULL);
33}
34LSSL_ALIAS(SSL_library_init);
35
29static void 36static void
30OPENSSL_init_ssl_internal(void) 37OPENSSL_init_ssl_internal(void)
31{ 38{