From 0b1a5afd905094c68f844dab1f719ce74029092d Mon Sep 17 00:00:00 2001 From: beck Date: Mon, 8 Jul 2024 16:24:22 +0000 Subject: [PATCH] Hide global _it symbols in asn1t.h ok tb@ --- lib/libcrypto/Symbols.namespace | 5 +++++ lib/libcrypto/asn1/asn1t.h | 5 +---- lib/libcrypto/asn1/tasn_typ.c | 3 ++- lib/libcrypto/asn1/x_bignum.c | 4 +++- lib/libcrypto/asn1/x_long.c | 4 +++- lib/libcrypto/hidden/openssl/asn1t.h | 7 ++++++- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 36d9a257252..0b8e1f91f24 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -3322,3 +3322,8 @@ _libre_PKCS7_ENCRYPT_it _libre_PKCS7_it _libre_PKCS7_ATTR_SIGN_it _libre_PKCS7_ATTR_VERIFY_it +_libre_ASN1_SEQUENCE_it +_libre_CBIGNUM_it +_libre_BIGNUM_it +_libre_LONG_it +_libre_ZLONG_it diff --git a/lib/libcrypto/asn1/asn1t.h b/lib/libcrypto/asn1/asn1t.h index 4d79f82ec78..22cde48669e 100644 --- a/lib/libcrypto/asn1/asn1t.h +++ b/lib/libcrypto/asn1/asn1t.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1t.h,v 1.23 2023/07/28 10:00:10 tb Exp $ */ +/* $OpenBSD: asn1t.h,v 1.24 2024/07/08 16:24:22 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -885,10 +885,7 @@ extern const ASN1_ITEM ASN1_SEQUENCE_it; extern const ASN1_ITEM BIGNUM_it; extern const ASN1_ITEM LONG_it; extern const ASN1_ITEM ZLONG_it; - -#ifndef LIBRESSL_INTERNAL extern const ASN1_ITEM CBIGNUM_it; -#endif DECLARE_STACK_OF(ASN1_VALUE) diff --git a/lib/libcrypto/asn1/tasn_typ.c b/lib/libcrypto/asn1/tasn_typ.c index 488d8ff44df..0f7fcb0e03e 100644 --- a/lib/libcrypto/asn1/tasn_typ.c +++ b/lib/libcrypto/asn1/tasn_typ.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tasn_typ.c,v 1.19 2024/07/08 14:52:31 beck Exp $ */ +/* $OpenBSD: tasn_typ.c,v 1.20 2024/07/08 16:24:22 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -487,6 +487,7 @@ const ASN1_ITEM ASN1_SEQUENCE_it = { .utype = V_ASN1_SEQUENCE, .sname = "ASN1_SEQUENCE", }; +LCRYPTO_ALIAS(ASN1_SEQUENCE_it); /* Multistring types */ diff --git a/lib/libcrypto/asn1/x_bignum.c b/lib/libcrypto/asn1/x_bignum.c index 35b30da5b6d..3e265b9cbcc 100644 --- a/lib/libcrypto/asn1/x_bignum.c +++ b/lib/libcrypto/asn1/x_bignum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_bignum.c,v 1.14 2024/05/17 02:47:21 tb Exp $ */ +/* $OpenBSD: x_bignum.c,v 1.15 2024/07/08 16:24:22 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -99,6 +99,7 @@ const ASN1_ITEM BIGNUM_it = { .size = 0, .sname = "BIGNUM", }; +LCRYPTO_ALIAS(BIGNUM_it); const ASN1_ITEM CBIGNUM_it = { .itype = ASN1_ITYPE_PRIMITIVE, @@ -109,6 +110,7 @@ const ASN1_ITEM CBIGNUM_it = { .size = 0, .sname = "BIGNUM", }; +LCRYPTO_ALIAS(CBIGNUM_it); static int bn_new(ASN1_VALUE **pval, const ASN1_ITEM *it) diff --git a/lib/libcrypto/asn1/x_long.c b/lib/libcrypto/asn1/x_long.c index 01a0811e7ed..5e673f45215 100644 --- a/lib/libcrypto/asn1/x_long.c +++ b/lib/libcrypto/asn1/x_long.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_long.c,v 1.20 2024/05/17 02:49:21 tb Exp $ */ +/* $OpenBSD: x_long.c,v 1.21 2024/07/08 16:24:22 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -101,6 +101,7 @@ const ASN1_ITEM LONG_it = { .size = ASN1_LONG_UNDEF, .sname = "LONG", }; +LCRYPTO_ALIAS(LONG_it); const ASN1_ITEM ZLONG_it = { .itype = ASN1_ITYPE_PRIMITIVE, @@ -111,6 +112,7 @@ const ASN1_ITEM ZLONG_it = { .size = 0, .sname = "ZLONG", }; +LCRYPTO_ALIAS(ZLONG_it); static void long_get(ASN1_VALUE **pval, long *out_val) diff --git a/lib/libcrypto/hidden/openssl/asn1t.h b/lib/libcrypto/hidden/openssl/asn1t.h index 666dea564c4..59f99baf756 100644 --- a/lib/libcrypto/hidden/openssl/asn1t.h +++ b/lib/libcrypto/hidden/openssl/asn1t.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1t.h,v 1.3 2023/07/28 10:00:10 tb Exp $ */ +/* $OpenBSD: asn1t.h,v 1.4 2024/07/08 16:24:22 beck Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -29,5 +29,10 @@ LCRYPTO_USED(ASN1_item_ex_new); LCRYPTO_USED(ASN1_item_ex_free); LCRYPTO_USED(ASN1_item_ex_d2i); LCRYPTO_USED(ASN1_item_ex_i2d); +extern LCRYPTO_USED(ASN1_SEQUENCE_it); +extern LCRYPTO_USED(BIGNUM_it); +extern LCRYPTO_USED(LONG_it); +extern LCRYPTO_USED(ZLONG_it); +extern LCRYPTO_UNUSED(CBIGNUM_it); #endif /* _LIBCRYPTO_ASN1T_H */ -- 2.20.1