summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/engine/eng_lib.c
diff options
context:
space:
mode:
authorbeck <>2018-03-17 16:20:01 +0000
committerbeck <>2018-03-17 16:20:01 +0000
commitd18ae25f28e72831dc3c51f78e0735342540098b (patch)
tree12cc674e7652f4d67e57ec9e1882e6e824b4808d /src/lib/libcrypto/engine/eng_lib.c
parent736fdc7bedf7fe8b17717032f7380c5c6e247d0d (diff)
downloadopenbsd-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/libcrypto/engine/eng_lib.c')
-rw-r--r--src/lib/libcrypto/engine/eng_lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/engine/eng_lib.c b/src/lib/libcrypto/engine/eng_lib.c
index d2da29fe69..11ad771109 100644
--- a/src/lib/libcrypto/engine/eng_lib.c
+++ b/src/lib/libcrypto/engine/eng_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: eng_lib.c,v 1.12 2017/01/29 17:49:23 beck Exp $ */ 1/* $OpenBSD: eng_lib.c,v 1.13 2018/03/17 16:20:01 beck Exp $ */
2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL 2/* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL
3 * project 2000. 3 * project 2000.
4 */ 4 */
@@ -70,6 +70,9 @@ ENGINE_new(void)
70{ 70{
71 ENGINE *ret; 71 ENGINE *ret;
72 72
73 if (!OPENSSL_init_crypto(0, NULL))
74 return NULL;
75
73 ret = malloc(sizeof(ENGINE)); 76 ret = malloc(sizeof(ENGINE));
74 if (ret == NULL) { 77 if (ret == NULL) {
75 ENGINEerror(ERR_R_MALLOC_FAILURE); 78 ENGINEerror(ERR_R_MALLOC_FAILURE);