From b04c2a1d799fe2ea8751349ab1dc4a8b551ce48d Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 9 Mar 2025 15:29:56 +0000 Subject: Align CRYPTO_set_mem*_functions with OpenSSL 1.1 CRYPTO_set_mem_ex_functions() was renamed to CRYPTO_set_mem_functions(), replacing the latter while also correcting the arguments for the free pointer. The backstory is that a commit that was never compiled was fixed the wrong way an hour later (both committed without review, obviously), and here we are, still cleaning up the mess 23 years later. We carry patches in cjose and stunnel for this; dovecot and links+ have autoconf checks and will adapt. Oh, and then there's the mariadb configure time insanity passing wrong function pointers... ok jsing --- src/lib/libcrypto/crypto_memory.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/lib/libcrypto/crypto_memory.c') diff --git a/src/lib/libcrypto/crypto_memory.c b/src/lib/libcrypto/crypto_memory.c index 773927b831..8c7bb5fe16 100644 --- a/src/lib/libcrypto/crypto_memory.c +++ b/src/lib/libcrypto/crypto_memory.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_memory.c,v 1.3 2024/11/06 04:18:42 tb Exp $ */ +/* $OpenBSD: crypto_memory.c,v 1.4 2025/03/09 15:29:56 tb Exp $ */ /* * Copyright (c) 2014 Bob Beck * @@ -29,21 +29,14 @@ OPENSSL_cleanse(void *ptr, size_t len) LCRYPTO_ALIAS(OPENSSL_cleanse); int -CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t), - void (*f)(void *)) +CRYPTO_set_mem_functions(void *(*m)(size_t, const char *, int), + void *(*r)(void *, size_t, const char *, int), + void (*f)(void *, const char *, int)) { return 0; } LCRYPTO_ALIAS(CRYPTO_set_mem_functions); -int -CRYPTO_set_mem_ex_functions(void *(*m)(size_t, const char *, int), - void *(*r)(void *, size_t, const char *, int), void (*f)(void *)) -{ - return 0; -} -LCRYPTO_ALIAS(CRYPTO_set_mem_ex_functions); - void * CRYPTO_malloc(size_t num, const char *file, int line) { -- cgit v1.2.3-55-g6feb