From 1db5243cd84ea891ffd4f11edecbf2e8156ea960 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 2 Mar 2024 11:32:31 +0000 Subject: [PATCH] Remove CRYPTO_*info Long time neutered, only used (pointlessly without error checking) in the error code until very recently. ok jsing --- lib/libcrypto/Symbols.list | 3 --- lib/libcrypto/Symbols.namespace | 3 --- lib/libcrypto/crypto.h | 8 +------- lib/libcrypto/hidden/openssl/crypto.h | 5 +---- lib/libcrypto/mem_dbg.c | 27 +-------------------------- 5 files changed, 3 insertions(+), 43 deletions(-) diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 26170084e5b..f9ef997e307 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -687,9 +687,6 @@ CRYPTO_ofb128_encrypt CRYPTO_poly1305_finish CRYPTO_poly1305_init CRYPTO_poly1305_update -CRYPTO_pop_info -CRYPTO_push_info_ -CRYPTO_remove_all_info CRYPTO_set_add_lock_callback CRYPTO_set_dynlock_create_callback CRYPTO_set_dynlock_destroy_callback diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index ff6e6492e22..489c618ec58 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -1867,9 +1867,6 @@ _libre_CRYPTO_set_mem_debug_functions _libre_CRYPTO_realloc_clean _libre_CRYPTO_remalloc _libre_CRYPTO_set_mem_debug_options -_libre_CRYPTO_push_info_ -_libre_CRYPTO_pop_info -_libre_CRYPTO_remove_all_info _libre_OpenSSLDie _libre_OPENSSL_cpu_caps _libre_OPENSSL_init_crypto diff --git a/lib/libcrypto/crypto.h b/lib/libcrypto/crypto.h index 19732ced327..67c5820500f 100644 --- a/lib/libcrypto/crypto.h +++ b/lib/libcrypto/crypto.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.h,v 1.66 2024/03/02 11:28:46 tb Exp $ */ +/* $OpenBSD: crypto.h,v 1.67 2024/03/02 11:32:31 tb Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -373,12 +373,6 @@ void CRYPTO_free(void *ptr); void OPENSSL_cleanse(void *ptr, size_t len); #endif -#define CRYPTO_push_info(info) \ - CRYPTO_push_info_(info, NULL, 0); -int CRYPTO_push_info_(const char *info, const char *file, int line); -int CRYPTO_pop_info(void); -int CRYPTO_remove_all_info(void); - /* * Because this is a public header, use a portable method of indicating the * function does not return, rather than __dead. diff --git a/lib/libcrypto/hidden/openssl/crypto.h b/lib/libcrypto/hidden/openssl/crypto.h index efbcca975f4..3e8f3dc7a80 100644 --- a/lib/libcrypto/hidden/openssl/crypto.h +++ b/lib/libcrypto/hidden/openssl/crypto.h @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.h,v 1.4 2024/03/02 11:28:46 tb Exp $ */ +/* $OpenBSD: crypto.h,v 1.5 2024/03/02 11:32:31 tb Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -44,9 +44,6 @@ LCRYPTO_USED(CRYPTO_THREADID_cpy); LCRYPTO_USED(CRYPTO_THREADID_hash); LCRYPTO_USED(CRYPTO_set_mem_functions); LCRYPTO_USED(CRYPTO_set_mem_ex_functions); -LCRYPTO_USED(CRYPTO_push_info_); -LCRYPTO_USED(CRYPTO_pop_info); -LCRYPTO_USED(CRYPTO_remove_all_info); LCRYPTO_USED(OpenSSLDie); LCRYPTO_USED(OPENSSL_cpu_caps); LCRYPTO_USED(OPENSSL_init_crypto); diff --git a/lib/libcrypto/mem_dbg.c b/lib/libcrypto/mem_dbg.c index bfdd9c171bf..031db43e3b8 100644 --- a/lib/libcrypto/mem_dbg.c +++ b/lib/libcrypto/mem_dbg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem_dbg.c,v 1.26 2024/03/02 11:28:46 tb Exp $ */ +/* $OpenBSD: mem_dbg.c,v 1.27 2024/03/02 11:32:31 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -109,35 +109,10 @@ * */ -#include -#include #include -#include -#include int CRYPTO_mem_ctrl(int mode) { return (CRYPTO_MEM_CHECK_OFF); } - -int -CRYPTO_push_info_(const char *info, const char *file, int line) -{ - return (0); -} -LCRYPTO_ALIAS(CRYPTO_push_info_); - -int -CRYPTO_pop_info(void) -{ - return (0); -} -LCRYPTO_ALIAS(CRYPTO_pop_info); - -int -CRYPTO_remove_all_info(void) -{ - return (0); -} -LCRYPTO_ALIAS(CRYPTO_remove_all_info); -- 2.20.1