From: tb Date: Thu, 3 Oct 2024 03:47:40 +0000 (+0000) Subject: Provide OPENSSL_INIT_NO_ATEXIT noop X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7b1bbb1481baf7f73d9f5ef24773942d98c9c320;p=openbsd 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 --- diff --git a/lib/libcrypto/crypto.h b/lib/libcrypto/crypto.h index bcca5a0ace2..33b6fe41963 100644 --- a/lib/libcrypto/crypto.h +++ b/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);