summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/Makefile3
-rw-r--r--src/lib/libcrypto/crypto_legacy.c9
-rw-r--r--src/lib/libcrypto/mem_clr.c12
3 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile
index ccc5e0b5c6..a8de346633 100644
--- a/src/lib/libcrypto/Makefile
+++ b/src/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.220 2024/11/05 11:02:58 tb Exp $ 1# $OpenBSD: Makefile,v 1.221 2024/11/05 11:05:01 tb Exp $
2 2
3LIB= crypto 3LIB= crypto
4LIBREBUILD=y 4LIBREBUILD=y
@@ -62,7 +62,6 @@ SRCS+= crypto_init.c
62SRCS+= crypto_legacy.c 62SRCS+= crypto_legacy.c
63SRCS+= crypto_lock.c 63SRCS+= crypto_lock.c
64SRCS+= malloc-wrapper.c 64SRCS+= malloc-wrapper.c
65SRCS+= mem_clr.c
66SRCS+= mem_dbg.c 65SRCS+= mem_dbg.c
67SRCS+= o_fips.c 66SRCS+= o_fips.c
68 67
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{
diff --git a/src/lib/libcrypto/mem_clr.c b/src/lib/libcrypto/mem_clr.c
deleted file mode 100644
index a936dcc5b8..0000000000
--- a/src/lib/libcrypto/mem_clr.c
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $OpenBSD: mem_clr.c,v 1.5 2024/04/10 14:51:02 beck Exp $ */
2
3/* Ted Unangst places this file in the public domain. */
4#include <string.h>
5#include <openssl/crypto.h>
6
7void
8OPENSSL_cleanse(void *ptr, size_t len)
9{
10 explicit_bzero(ptr, len);
11}
12LCRYPTO_ALIAS(OPENSSL_cleanse);