From da7b0f4bfa71c9b8be4c449be0da83036941e3a2 Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 3 Oct 2024 03:47:40 +0000 Subject: 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 --- src/lib/libcrypto/crypto.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ -/* $OpenBSD: crypto.h,v 1.75 2024/08/31 12:43:58 jsing Exp $ */ +/* $OpenBSD: crypto.h,v 1.76 2024/10/03 03:47:40 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -416,6 +416,7 @@ int CRYPTO_memcmp(const void *a, const void *b, size_t len); #define OPENSSL_INIT_reserved_internal _OPENSSL_INIT_FLAG_NOOP #define OPENSSL_INIT_ATFORK _OPENSSL_INIT_FLAG_NOOP #define OPENSSL_INIT_ENGINE_ALL_BUILTIN _OPENSSL_INIT_FLAG_NOOP +#define OPENSSL_INIT_NO_ATEXIT _OPENSSL_INIT_FLAG_NOOP int OPENSSL_init_crypto(uint64_t opts, const void *settings); void OPENSSL_cleanup(void); -- cgit v1.2.3-55-g6feb