summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto_legacy.c
diff options
context:
space:
mode:
authortb <>2024-11-05 11:05:01 +0000
committertb <>2024-11-05 11:05:01 +0000
commiteb765cd4a2b07da3fc92af29a4762d2c91e71441 (patch)
tree701a89c82b106700d9a949b62d0d172a0faa0d02 /src/lib/libcrypto/crypto_legacy.c
parent8b19337000a05871189304b9adfbddcca405e429 (diff)
downloadopenbsd-eb765cd4a2b07da3fc92af29a4762d2c91e71441.tar.gz
openbsd-eb765cd4a2b07da3fc92af29a4762d2c91e71441.tar.bz2
openbsd-eb765cd4a2b07da3fc92af29a4762d2c91e71441.zip
Move OPENSSL_cleanse() to crypto_legacy()
The correct spelling is explicit_bzero() and it doesn't need its own file. discussed with jsing
Diffstat (limited to 'src/lib/libcrypto/crypto_legacy.c')
-rw-r--r--src/lib/libcrypto/crypto_legacy.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/crypto_legacy.c b/src/lib/libcrypto/crypto_legacy.c
index 65ca9b5f9a..9e3ba4f3ed 100644
--- a/src/lib/libcrypto/crypto_legacy.c
+++ b/src/lib/libcrypto/crypto_legacy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto_legacy.c,v 1.2 2024/11/05 11:02:58 tb Exp $ */ 1/* $OpenBSD: crypto_legacy.c,v 1.3 2024/11/05 11:05:01 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -356,6 +356,13 @@ OpenSSLDie(const char *file, int line, const char *assertion)
356} 356}
357LCRYPTO_ALIAS(OpenSSLDie); 357LCRYPTO_ALIAS(OpenSSLDie);
358 358
359void
360OPENSSL_cleanse(void *ptr, size_t len)
361{
362 explicit_bzero(ptr, len);
363}
364LCRYPTO_ALIAS(OPENSSL_cleanse);
365
359int 366int
360CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len) 367CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
361{ 368{