summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio
diff options
context:
space:
mode:
authorbeck <>2018-03-17 16:20:01 +0000
committerbeck <>2018-03-17 16:20:01 +0000
commit035770aca4c8c1f0d36f1b8da62c9e1fb9a4f09b (patch)
tree12cc674e7652f4d67e57ec9e1882e6e824b4808d /src/lib/libcrypto/bio
parent1c31745efe6ed99c3a4e427046074fc4b544f08d (diff)
downloadopenbsd-035770aca4c8c1f0d36f1b8da62c9e1fb9a4f09b.tar.gz
openbsd-035770aca4c8c1f0d36f1b8da62c9e1fb9a4f09b.tar.bz2
openbsd-035770aca4c8c1f0d36f1b8da62c9e1fb9a4f09b.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/libcrypto/bio')
-rw-r--r--src/lib/libcrypto/bio/b_posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bio/b_posix.c b/src/lib/libcrypto/bio/b_posix.c
index a850bc6aea..aed51bd717 100644
--- a/src/lib/libcrypto/bio/b_posix.c
+++ b/src/lib/libcrypto/bio/b_posix.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: b_posix.c,v 1.1 2014/12/03 22:14:38 bcook Exp $ */ 1/* $OpenBSD: b_posix.c,v 1.2 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 *
@@ -68,6 +68,8 @@
68int 68int
69BIO_sock_init(void) 69BIO_sock_init(void)
70{ 70{
71 if (!OPENSSL_init_crypto(0, NULL)) /* XXX do we need this? */
72 return (0);
71 return (1); 73 return (1);
72} 74}
73 75