From 1a028405d9273f34c544f9f13321c6313cc407bd Mon Sep 17 00:00:00 2001
From: beck <>
Date: Mon, 8 Jul 2024 16:24:22 +0000
Subject: Hide global _it symbols in asn1t.h

ok tb@
---
 src/lib/libcrypto/Symbols.namespace      | 5 +++++
 src/lib/libcrypto/asn1/asn1t.h           | 5 +----
 src/lib/libcrypto/asn1/tasn_typ.c        | 3 ++-
 src/lib/libcrypto/asn1/x_bignum.c        | 4 +++-
 src/lib/libcrypto/asn1/x_long.c          | 4 +++-
 src/lib/libcrypto/hidden/openssl/asn1t.h | 7 ++++++-
 6 files changed, 20 insertions(+), 8 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/libcrypto/Symbols.namespace b/src/lib/libcrypto/Symbols.namespace
index 36d9a25725..0b8e1f91f2 100644
--- a/src/lib/libcrypto/Symbols.namespace
+++ b/src/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/src/lib/libcrypto/asn1/asn1t.h b/src/lib/libcrypto/asn1/asn1t.h
index 4d79f82ec7..22cde48669 100644
--- a/src/lib/libcrypto/asn1/asn1t.h
+++ b/src/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/src/lib/libcrypto/asn1/tasn_typ.c b/src/lib/libcrypto/asn1/tasn_typ.c
index 488d8ff44d..0f7fcb0e03 100644
--- a/src/lib/libcrypto/asn1/tasn_typ.c
+++ b/src/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/src/lib/libcrypto/asn1/x_bignum.c b/src/lib/libcrypto/asn1/x_bignum.c
index 35b30da5b6..3e265b9cbc 100644
--- a/src/lib/libcrypto/asn1/x_bignum.c
+++ b/src/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/src/lib/libcrypto/asn1/x_long.c b/src/lib/libcrypto/asn1/x_long.c
index 01a0811e7e..5e673f4521 100644
--- a/src/lib/libcrypto/asn1/x_long.c
+++ b/src/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/src/lib/libcrypto/hidden/openssl/asn1t.h b/src/lib/libcrypto/hidden/openssl/asn1t.h
index 666dea564c..59f99baf75 100644
--- a/src/lib/libcrypto/hidden/openssl/asn1t.h
+++ b/src/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 <beck@openbsd.org>
  *
@@ -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 */
-- 
cgit v1.2.3-55-g6feb