Commit b0041c909e for openssl.org
commit b0041c909ef4c9d59f1139ed8957ec9a9c12856f
Author: Frederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>
Date: Thu Dec 25 08:46:24 2025 +0100
Cleanup in cryptlib.h.
Remove unused ossl_crypto_ex_data_get_ossl_lib_ctx() and memdbg_lock.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu Jan 8 10:08:08 2026
(Merged from https://github.com/openssl/openssl/pull/29500)
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index 98119d5a6c..e3d719b1c3 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -500,8 +500,3 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)
return NULL;
return sk_void_value(ad->sk, idx);
}
-
-OSSL_LIB_CTX *ossl_crypto_ex_data_get_ossl_lib_ctx(const CRYPTO_EX_DATA *ad)
-{
- return ad->ctx;
-}
diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h
index a21172f86f..545696b715 100644
--- a/include/internal/cryptlib.h
+++ b/include/internal/cryptlib.h
@@ -46,7 +46,6 @@ int openssl_get_fork_id(void);
char *ossl_safe_getenv(const char *name);
-extern CRYPTO_RWLOCK *memdbg_lock;
int openssl_strerror_r(int errnum, char *buf, size_t buflen);
#if !defined(OPENSSL_NO_STDIO)
FILE *openssl_fopen(const char *filename, const char *mode);
@@ -133,7 +132,6 @@ OSSL_EX_DATA_GLOBAL *ossl_lib_ctx_get_ex_data_global(OSSL_LIB_CTX *ctx);
const char *ossl_lib_ctx_get_descriptor(OSSL_LIB_CTX *libctx);
-OSSL_LIB_CTX *ossl_crypto_ex_data_get_ossl_lib_ctx(const CRYPTO_EX_DATA *ad);
int ossl_crypto_new_ex_data_ex(OSSL_LIB_CTX *ctx, int class_index, void *obj,
CRYPTO_EX_DATA *ad);
int ossl_crypto_get_ex_new_index_ex(OSSL_LIB_CTX *ctx, int class_index,