diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/crypto_legacy.c | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/mem_clr.c | 12 |
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 | ||
| 3 | LIB= crypto | 3 | LIB= crypto |
| 4 | LIBREBUILD=y | 4 | LIBREBUILD=y |
| @@ -62,7 +62,6 @@ SRCS+= crypto_init.c | |||
| 62 | SRCS+= crypto_legacy.c | 62 | SRCS+= crypto_legacy.c |
| 63 | SRCS+= crypto_lock.c | 63 | SRCS+= crypto_lock.c |
| 64 | SRCS+= malloc-wrapper.c | 64 | SRCS+= malloc-wrapper.c |
| 65 | SRCS+= mem_clr.c | ||
| 66 | SRCS+= mem_dbg.c | 65 | SRCS+= mem_dbg.c |
| 67 | SRCS+= o_fips.c | 66 | SRCS+= 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 | } |
| 357 | LCRYPTO_ALIAS(OpenSSLDie); | 357 | LCRYPTO_ALIAS(OpenSSLDie); |
| 358 | 358 | ||
| 359 | void | ||
| 360 | OPENSSL_cleanse(void *ptr, size_t len) | ||
| 361 | { | ||
| 362 | explicit_bzero(ptr, len); | ||
| 363 | } | ||
| 364 | LCRYPTO_ALIAS(OPENSSL_cleanse); | ||
| 365 | |||
| 359 | int | 366 | int |
| 360 | CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len) | 367 | CRYPTO_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 | |||
| 7 | void | ||
| 8 | OPENSSL_cleanse(void *ptr, size_t len) | ||
| 9 | { | ||
| 10 | explicit_bzero(ptr, len); | ||
| 11 | } | ||
| 12 | LCRYPTO_ALIAS(OPENSSL_cleanse); | ||
