summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto.h
diff options
context:
space:
mode:
authortb <>2024-10-03 03:47:40 +0000
committertb <>2024-10-03 03:47:40 +0000
commitda7b0f4bfa71c9b8be4c449be0da83036941e3a2 (patch)
treea16b08e2cfa63ac2875f2cf40dcd3193ca24de99 /src/lib/libcrypto/crypto.h
parenta0b6f18253e468b0a3b8ded7ad09be0bf69f5010 (diff)
downloadopenbsd-da7b0f4bfa71c9b8be4c449be0da83036941e3a2.tar.gz
openbsd-da7b0f4bfa71c9b8be4c449be0da83036941e3a2.tar.bz2
openbsd-da7b0f4bfa71c9b8be4c449be0da83036941e3a2.zip
Provide OPENSSL_INIT_NO_ATEXIT noop
The brilliant idea of installing a fragile non-idempotent cleanup atexit handler as a library has bitten many people over time. This gets particularly exciting when you can't control who dlopens the lib first (don't we all love Python bindings) or if you are in a threaded context. Fake OpenSSL clones chose not to do this but now get to carry a noop flag since people start opting out of this madness (there's a good old tradition at work here). ok beck joshua jsing millert miod
Diffstat (limited to 'src/lib/libcrypto/crypto.h')
-rw-r--r--src/lib/libcrypto/crypto.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index bcca5a0ace..33b6fe4196 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.75 2024/08/31 12:43:58 jsing Exp $ */ 1/* $OpenBSD: crypto.h,v 1.76 2024/10/03 03:47:40 tb 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 *
@@ -416,6 +416,7 @@ int CRYPTO_memcmp(const void *a, const void *b, size_t len);
416#define OPENSSL_INIT_reserved_internal _OPENSSL_INIT_FLAG_NOOP 416#define OPENSSL_INIT_reserved_internal _OPENSSL_INIT_FLAG_NOOP
417#define OPENSSL_INIT_ATFORK _OPENSSL_INIT_FLAG_NOOP 417#define OPENSSL_INIT_ATFORK _OPENSSL_INIT_FLAG_NOOP
418#define OPENSSL_INIT_ENGINE_ALL_BUILTIN _OPENSSL_INIT_FLAG_NOOP 418#define OPENSSL_INIT_ENGINE_ALL_BUILTIN _OPENSSL_INIT_FLAG_NOOP
419#define OPENSSL_INIT_NO_ATEXIT _OPENSSL_INIT_FLAG_NOOP
419 420
420int OPENSSL_init_crypto(uint64_t opts, const void *settings); 421int OPENSSL_init_crypto(uint64_t opts, const void *settings);
421void OPENSSL_cleanup(void); 422void OPENSSL_cleanup(void);