From 3c3cde99435540618e76a54866d3d61c0a62c8f7 Mon Sep 17 00:00:00 2001 From: beck Date: Mon, 8 Jul 2024 17:10:18 +0000 Subject: [PATCH] Hide global _it symbols in rsa.h ok tb@ --- lib/libcrypto/Symbols.namespace | 8 ++++++++ lib/libcrypto/hidden/openssl/rsa.h | 8 +++++++- lib/libcrypto/rsa/rsa_asn1.c | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 0b8e1f91f24..d704fd7cf8e 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -3327,3 +3327,11 @@ _libre_CBIGNUM_it _libre_BIGNUM_it _libre_LONG_it _libre_ZLONG_it +_libre_RSAPublicKey_it +_libre_RSAPrivateKey_it +_libre_RSA_PSS_PARAMS_it +_libre_RSA_OAEP_PARAMS_it +_libre_RSAPublicKey_it +_libre_RSAPrivateKey_it +_libre_RSA_PSS_PARAMS_it +_libre_RSA_OAEP_PARAMS_it diff --git a/lib/libcrypto/hidden/openssl/rsa.h b/lib/libcrypto/hidden/openssl/rsa.h index ff47101a070..a115684c903 100644 --- a/lib/libcrypto/hidden/openssl/rsa.h +++ b/lib/libcrypto/hidden/openssl/rsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.h,v 1.2 2023/07/28 10:05:16 tb Exp $ */ +/* $OpenBSD: rsa.h,v 1.3 2024/07/08 17:10:18 beck Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -137,5 +137,11 @@ LCRYPTO_USED(RSA_meth_set_sign); LCRYPTO_USED(RSA_meth_get_verify); LCRYPTO_USED(RSA_meth_set_verify); LCRYPTO_USED(ERR_load_RSA_strings); +#if defined(LIBRESSL_NAMESPACE) +extern LCRYPTO_USED(RSAPublicKey_it); +extern LCRYPTO_USED(RSAPrivateKey_it); +extern LCRYPTO_USED(RSA_PSS_PARAMS_it); +extern LCRYPTO_USED(RSA_OAEP_PARAMS_it); +#endif #endif /* _LIBCRYPTO_RSA_H */ diff --git a/lib/libcrypto/rsa/rsa_asn1.c b/lib/libcrypto/rsa/rsa_asn1.c index 0f6d8c49fe7..1526e07931e 100644 --- a/lib/libcrypto/rsa/rsa_asn1.c +++ b/lib/libcrypto/rsa/rsa_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_asn1.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */ +/* $OpenBSD: rsa_asn1.c,v 1.18 2024/07/08 17:10:18 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -165,6 +165,7 @@ const ASN1_ITEM RSAPrivateKey_it = { .size = sizeof(RSA), .sname = "RSA", }; +LCRYPTO_ALIAS(RSAPrivateKey_it); static const ASN1_AUX RSAPublicKey_aux = { @@ -201,6 +202,7 @@ const ASN1_ITEM RSAPublicKey_it = { .size = sizeof(RSA), .sname = "RSA", }; +LCRYPTO_ALIAS(RSAPublicKey_it); static int rsa_pss_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) @@ -262,6 +264,7 @@ const ASN1_ITEM RSA_PSS_PARAMS_it = { .size = sizeof(RSA_PSS_PARAMS), .sname = "RSA_PSS_PARAMS", }; +LCRYPTO_ALIAS(RSA_PSS_PARAMS_it); RSA_PSS_PARAMS * d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len) @@ -345,6 +348,7 @@ const ASN1_ITEM RSA_OAEP_PARAMS_it = { .size = sizeof(RSA_OAEP_PARAMS), .sname = "RSA_OAEP_PARAMS", }; +LCRYPTO_ALIAS(RSA_OAEP_PARAMS_it); RSA_OAEP_PARAMS * -- 2.20.1