From a9aaa79e987626d9ef9e92ced79c4da0d0ba4de8 Mon Sep 17 00:00:00 2001 From: beck Date: Tue, 9 Jul 2024 07:16:13 +0000 Subject: [PATCH] Hide DES global variables ok tb@ --- lib/libcrypto/Symbols.namespace | 2 ++ lib/libcrypto/des/enc_read.c | 3 ++- lib/libcrypto/des/set_key.c | 3 ++- lib/libcrypto/hidden/openssl/des.h | 6 +++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index c5622dff336..8cdca7e4271 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -3344,6 +3344,8 @@ _libre_X509_STORE_CTX_get_check_issued _libre_X509_STORE_get_check_issued _libre_X509_STORE_set_check_issued _libre_lh_error +_libre_DES_check_key +_libre_DES_rw_mode _libre_RSAPublicKey_it _libre_RSAPrivateKey_it _libre_RSA_PSS_PARAMS_it diff --git a/lib/libcrypto/des/enc_read.c b/lib/libcrypto/des/enc_read.c index 35704315e16..32f7547a3f3 100644 --- a/lib/libcrypto/des/enc_read.c +++ b/lib/libcrypto/des/enc_read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enc_read.c,v 1.19 2024/05/24 19:16:53 tb Exp $ */ +/* $OpenBSD: enc_read.c,v 1.20 2024/07/09 07:16:13 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -67,6 +67,7 @@ */ int DES_rw_mode = DES_PCBC_MODE; +LCRYPTO_ALIAS(DES_rw_mode); int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched, diff --git a/lib/libcrypto/des/set_key.c b/lib/libcrypto/des/set_key.c index 0e7aab688cc..9a9dcf7c52d 100644 --- a/lib/libcrypto/des/set_key.c +++ b/lib/libcrypto/des/set_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: set_key.c,v 1.27 2024/03/29 01:47:29 joshua Exp $ */ +/* $OpenBSD: set_key.c,v 1.28 2024/07/09 07:16:13 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -63,6 +63,7 @@ #include "des_local.h" int DES_check_key = 0; /* defaults to false */ +LCRYPTO_ALIAS(DES_check_key); static const unsigned char odd_parity[256] = { 1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14, diff --git a/lib/libcrypto/hidden/openssl/des.h b/lib/libcrypto/hidden/openssl/des.h index 9f6ea9c1042..e632de4b115 100644 --- a/lib/libcrypto/hidden/openssl/des.h +++ b/lib/libcrypto/hidden/openssl/des.h @@ -1,4 +1,4 @@ -/* $OpenBSD: des.h,v 1.1 2024/03/29 01:47:29 joshua Exp $ */ +/* $OpenBSD: des.h,v 1.2 2024/07/09 07:16:13 beck Exp $ */ /* * Copyright (c) 2024 Joshua Sing * @@ -60,5 +60,9 @@ LCRYPTO_USED(DES_string_to_key); LCRYPTO_USED(DES_string_to_2keys); LCRYPTO_USED(DES_cfb64_encrypt); LCRYPTO_USED(DES_ofb64_encrypt); +#if defined(LIBRESSL_NAMESPACE) +extern LCRYPTO_USED(DES_check_key); +extern LCRYPTO_USED(DES_rw_mode); +#endif #endif /* _LIBCRYPTO_DES_H */ -- 2.20.1