summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/c_zlib.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/comp/c_zlib.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/comp/c_zlib.c')
-rw-r--r--src/lib/libcrypto/comp/c_zlib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/comp/c_zlib.c b/src/lib/libcrypto/comp/c_zlib.c
index 1802cffd99..0cdbb205a4 100644
--- a/src/lib/libcrypto/comp/c_zlib.c
+++ b/src/lib/libcrypto/comp/c_zlib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: c_zlib.c,v 1.19 2017/01/29 17:49:22 beck Exp $ */ 1/* $OpenBSD: c_zlib.c,v 1.20 2018/03/17 16:20:01 beck Exp $ */
2#include <stdio.h> 2#include <stdio.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
@@ -191,6 +191,8 @@ COMP_zlib(void)
191 if (zlib_stateful_ex_idx == -1) 191 if (zlib_stateful_ex_idx == -1)
192 goto err; 192 goto err;
193 } 193 }
194 if (!OPENSSL_init_crypto(0, NULL))
195 goto err;
194 196
195 meth = &zlib_stateful_method; 197 meth = &zlib_stateful_method;
196 } 198 }