summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto.h
diff options
context:
space:
mode:
authorjsing <>2022-09-03 17:47:47 +0000
committerjsing <>2022-09-03 17:47:47 +0000
commit08cad1d5d4e840186d932d4ee28fa6e1463e3f28 (patch)
tree6da083f1c09ce39a19ff47ac81c6e23adb5057bc /src/lib/libcrypto/crypto.h
parent828c98a83649e3798a814f40f12bf41e09a605a6 (diff)
downloadopenbsd-08cad1d5d4e840186d932d4ee28fa6e1463e3f28.tar.gz
openbsd-08cad1d5d4e840186d932d4ee28fa6e1463e3f28.tar.bz2
openbsd-08cad1d5d4e840186d932d4ee28fa6e1463e3f28.zip
Prepare to provide OPENSSL_cleanup.
OPENSSL_cleanup() cleans up and deallocates memory in use by the library. There are a couple of use cases for this, primarily related to memory leak testing. This will not be called automatically in LibreSSL, which means that OpenSSL's OPENSSL_NO_INIT_ATEXIT is implied. If code wants to clean up then they need to explicitly call this themselves. ok tb@
Diffstat (limited to 'src/lib/libcrypto/crypto.h')
-rw-r--r--src/lib/libcrypto/crypto.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index 82372537e1..2d934413ea 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.55 2022/07/12 14:42:48 kn Exp $ */ 1/* $OpenBSD: crypto.h,v 1.56 2022/09/03 17:47:47 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -562,6 +562,9 @@ void ERR_load_CRYPTO_strings(void);
562#define OPENSSL_INIT_ENGINE_ALL_BUILTIN _OPENSSL_INIT_FLAG_NOOP 562#define OPENSSL_INIT_ENGINE_ALL_BUILTIN _OPENSSL_INIT_FLAG_NOOP
563 563
564int OPENSSL_init_crypto(uint64_t opts, const void *settings); 564int OPENSSL_init_crypto(uint64_t opts, const void *settings);
565#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
566void OPENSSL_cleanup(void);
567#endif
565 568
566#ifdef __cplusplus 569#ifdef __cplusplus
567} 570}