summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bio
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2018-03-17 16:20:02 +0000
committerBob Beck <beck@cvs.openbsd.org>2018-03-17 16:20:02 +0000
commitd83b0021084a06853c2e11f06f5db729bf3d6b63 (patch)
tree9bc3c82ef5d22ad7695889a5ca723dc30571fe51 /lib/libcrypto/bio
parentf1c695dbced730499b0200286f944d2c271be41d (diff)
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 'lib/libcrypto/bio')
-rw-r--r--lib/libcrypto/bio/b_posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/bio/b_posix.c b/lib/libcrypto/bio/b_posix.c
index a850bc6aead..aed51bd7170 100644
--- a/lib/libcrypto/bio/b_posix.c
+++ b/lib/libcrypto/bio/b_posix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: b_posix.c,v 1.1 2014/12/03 22:14:38 bcook Exp $ */
+/* $OpenBSD: b_posix.c,v 1.2 2018/03/17 16:20:01 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -68,6 +68,8 @@
int
BIO_sock_init(void)
{
+ if (!OPENSSL_init_crypto(0, NULL)) /* XXX do we need this? */
+ return (0);
return (1);
}