diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2024-11-06 04:18:43 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2024-11-06 04:18:43 +0000 |
commit | 45db73dec9e44a301d453a2e1a78f605116803a9 (patch) | |
tree | d7755460c0ef369a84e3cf8981659c1c7ebabcf5 /lib/libcrypto | |
parent | c93e7cbb0d956dbab311d254dd2c293b6dd14ab6 (diff) |
Toss tedu's cleanse into crypto_memory.c
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/crypto_legacy.c | 9 | ||||
-rw-r--r-- | lib/libcrypto/crypto_memory.c | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/libcrypto/crypto_legacy.c b/lib/libcrypto/crypto_legacy.c index 94d51e92e23..d864fc4c3f1 100644 --- a/lib/libcrypto/crypto_legacy.c +++ b/lib/libcrypto/crypto_legacy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_legacy.c,v 1.5 2024/11/05 11:14:04 tb Exp $ */ +/* $OpenBSD: crypto_legacy.c,v 1.6 2024/11/06 04:18:42 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -357,13 +357,6 @@ OpenSSLDie(const char *file, int line, const char *assertion) } LCRYPTO_ALIAS(OpenSSLDie); -void -OPENSSL_cleanse(void *ptr, size_t len) -{ - explicit_bzero(ptr, len); -} -LCRYPTO_ALIAS(OPENSSL_cleanse); - int CRYPTO_mem_ctrl(int mode) { diff --git a/lib/libcrypto/crypto_memory.c b/lib/libcrypto/crypto_memory.c index b009f7eb4ae..773927b8316 100644 --- a/lib/libcrypto/crypto_memory.c +++ b/lib/libcrypto/crypto_memory.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto_memory.c,v 1.2 2024/11/06 04:10:35 tb Exp $ */ +/* $OpenBSD: crypto_memory.c,v 1.3 2024/11/06 04:18:42 tb Exp $ */ /* * Copyright (c) 2014 Bob Beck * @@ -21,6 +21,13 @@ #include <openssl/crypto.h> +void +OPENSSL_cleanse(void *ptr, size_t len) +{ + explicit_bzero(ptr, len); +} +LCRYPTO_ALIAS(OPENSSL_cleanse); + int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t), void (*f)(void *)) |