diff options
author | tb <> | 2025-03-09 15:29:56 +0000 |
---|---|---|
committer | tb <> | 2025-03-09 15:29:56 +0000 |
commit | b04c2a1d799fe2ea8751349ab1dc4a8b551ce48d (patch) | |
tree | d09836f242ff268513c1c5d3722c69747b19c32e /src/lib/libcrypto/crypto_memory.c | |
parent | 5e452fbcbaa85718d1cafb0f047a72e9825b28a0 (diff) | |
download | openbsd-b04c2a1d799fe2ea8751349ab1dc4a8b551ce48d.tar.gz openbsd-b04c2a1d799fe2ea8751349ab1dc4a8b551ce48d.tar.bz2 openbsd-b04c2a1d799fe2ea8751349ab1dc4a8b551ce48d.zip |
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
Diffstat (limited to 'src/lib/libcrypto/crypto_memory.c')
-rw-r--r-- | src/lib/libcrypto/crypto_memory.c | 15 |
1 files changed, 4 insertions, 11 deletions
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 @@ | |||
1 | /* $OpenBSD: crypto_memory.c,v 1.3 2024/11/06 04:18:42 tb Exp $ */ | 1 | /* $OpenBSD: crypto_memory.c,v 1.4 2025/03/09 15:29:56 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Bob Beck | 3 | * Copyright (c) 2014 Bob Beck |
4 | * | 4 | * |
@@ -29,21 +29,14 @@ OPENSSL_cleanse(void *ptr, size_t len) | |||
29 | LCRYPTO_ALIAS(OPENSSL_cleanse); | 29 | LCRYPTO_ALIAS(OPENSSL_cleanse); |
30 | 30 | ||
31 | int | 31 | int |
32 | CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t), | 32 | CRYPTO_set_mem_functions(void *(*m)(size_t, const char *, int), |
33 | void (*f)(void *)) | 33 | void *(*r)(void *, size_t, const char *, int), |
34 | void (*f)(void *, const char *, int)) | ||
34 | { | 35 | { |
35 | return 0; | 36 | return 0; |
36 | } | 37 | } |
37 | LCRYPTO_ALIAS(CRYPTO_set_mem_functions); | 38 | LCRYPTO_ALIAS(CRYPTO_set_mem_functions); |
38 | 39 | ||
39 | int | ||
40 | CRYPTO_set_mem_ex_functions(void *(*m)(size_t, const char *, int), | ||
41 | void *(*r)(void *, size_t, const char *, int), void (*f)(void *)) | ||
42 | { | ||
43 | return 0; | ||
44 | } | ||
45 | LCRYPTO_ALIAS(CRYPTO_set_mem_ex_functions); | ||
46 | |||
47 | void * | 40 | void * |
48 | CRYPTO_malloc(size_t num, const char *file, int line) | 41 | CRYPTO_malloc(size_t num, const char *file, int line) |
49 | { | 42 | { |