From c0ebdaf2412157aeaa7510bf031a7409cb1080f2 Mon Sep 17 00:00:00 2001 From: beck Date: Mon, 8 Jul 2024 14:47:44 +0000 Subject: [PATCH] Hide global _it variables in x509v3.h ok tb@ --- lib/libcrypto/Symbols.namespace | 33 ++++++++++++++++++++++++ lib/libcrypto/hidden/openssl/x509v3.h | 36 ++++++++++++++++++++++++++- lib/libcrypto/x509/x509_addr.c | 6 ++++- lib/libcrypto/x509/x509_akeya.c | 3 ++- lib/libcrypto/x509/x509_asid.c | 6 ++++- lib/libcrypto/x509/x509_bcons.c | 3 ++- lib/libcrypto/x509/x509_cpols.c | 7 +++++- lib/libcrypto/x509/x509_crld.c | 6 ++++- lib/libcrypto/x509/x509_extku.c | 3 ++- lib/libcrypto/x509/x509_genn.c | 6 ++++- lib/libcrypto/x509/x509_info.c | 4 ++- lib/libcrypto/x509/x509_ncons.c | 4 ++- lib/libcrypto/x509/x509_pcons.c | 3 ++- lib/libcrypto/x509/x509_pku.c | 3 ++- lib/libcrypto/x509/x509_pmaps.c | 4 ++- 15 files changed, 113 insertions(+), 14 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 0abd5ef54da..18c93e981d4 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -3217,3 +3217,36 @@ _libre_EC_POINT_get_Jprojective_coordinates_GFp _libre_EC_POINT_set_affine_coordinates_GFp _libre_EC_POINT_get_affine_coordinates_GFp _libre_EC_POINT_set_compressed_coordinates_GFp +_libre_BASIC_CONSTRAINTS_it +_libre_AUTHORITY_KEYID_it +_libre_PKEY_USAGE_PERIOD_it +_libre_GENERAL_NAME_it +_libre_GENERAL_NAMES_it +_libre_OTHERNAME_it +_libre_EDIPARTYNAME_it +_libre_EXTENDED_KEY_USAGE_it +_libre_CERTIFICATEPOLICIES_it +_libre_POLICYINFO_it +_libre_POLICYQUALINFO_it +_libre_USERNOTICE_it +_libre_NOTICEREF_it +_libre_CRL_DIST_POINTS_it +_libre_DIST_POINT_it +_libre_DIST_POINT_NAME_it +_libre_DIST_POINT_it +_libre_ISSUING_DIST_POINT_it +_libre_ACCESS_DESCRIPTION_it +_libre_AUTHORITY_INFO_ACCESS_it +_libre_POLICY_MAPPING_it +_libre_POLICY_MAPPINGS_it +_libre_GENERAL_SUBTREE_it +_libre_NAME_CONSTRAINTS_it +_libre_POLICY_CONSTRAINTS_it +_libre_ASRange_it +_libre_ASIdOrRange_it +_libre_ASIdentifierChoice_it +_libre_ASIdentifiers_it +_libre_IPAddressRange_it +_libre_IPAddressOrRange_it +_libre_IPAddressChoice_it +_libre_IPAddressFamily_it diff --git a/lib/libcrypto/hidden/openssl/x509v3.h b/lib/libcrypto/hidden/openssl/x509v3.h index a833ec9f4e2..dac12ab09b2 100644 --- a/lib/libcrypto/hidden/openssl/x509v3.h +++ b/lib/libcrypto/hidden/openssl/x509v3.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509v3.h,v 1.7 2024/03/02 10:40:05 tb Exp $ */ +/* $OpenBSD: x509v3.h,v 1.8 2024/07/08 14:47:44 beck Exp $ */ /* * Copyright (c) 2022 Bob Beck * @@ -252,5 +252,39 @@ LCRYPTO_USED(X509v3_addr_validate_path); LCRYPTO_USED(X509v3_asid_validate_resource_set); LCRYPTO_USED(X509v3_addr_validate_resource_set); LCRYPTO_USED(ERR_load_X509V3_strings); +extern LCRYPTO_USED(BASIC_CONSTRAINTS_it); +extern LCRYPTO_USED(AUTHORITY_KEYID_it); +extern LCRYPTO_USED(PKEY_USAGE_PERIOD_it); +extern LCRYPTO_USED(GENERAL_NAME_it); +extern LCRYPTO_USED(GENERAL_NAMES_it); +extern LCRYPTO_USED(OTHERNAME_it); +extern LCRYPTO_USED(EDIPARTYNAME_it); +extern LCRYPTO_USED(EXTENDED_KEY_USAGE_it); +extern LCRYPTO_USED(CERTIFICATEPOLICIES_it); +extern LCRYPTO_USED(POLICYINFO_it); +extern LCRYPTO_USED(POLICYQUALINFO_it); +extern LCRYPTO_USED(USERNOTICE_it); +extern LCRYPTO_USED(NOTICEREF_it); +extern LCRYPTO_USED(CRL_DIST_POINTS_it); +extern LCRYPTO_USED(DIST_POINT_it); +extern LCRYPTO_USED(DIST_POINT_NAME_it); +extern LCRYPTO_USED(DIST_POINT_it); +extern LCRYPTO_USED(ISSUING_DIST_POINT_it); +extern LCRYPTO_USED(ACCESS_DESCRIPTION_it); +extern LCRYPTO_USED(AUTHORITY_INFO_ACCESS_it); +extern LCRYPTO_USED(POLICY_MAPPING_it); +extern LCRYPTO_USED(POLICY_MAPPINGS_it); +extern LCRYPTO_USED(GENERAL_SUBTREE_it); +extern LCRYPTO_USED(NAME_CONSTRAINTS_it); +extern LCRYPTO_USED(POLICY_CONSTRAINTS_it); +extern LCRYPTO_USED(ASRange_it); +extern LCRYPTO_USED(ASIdOrRange_it); +extern LCRYPTO_USED(ASIdentifierChoice_it); +extern LCRYPTO_USED(ASIdentifiers_it); +extern LCRYPTO_USED(IPAddressRange_it); +extern LCRYPTO_USED(IPAddressOrRange_it); +extern LCRYPTO_USED(IPAddressChoice_it); +extern LCRYPTO_USED(IPAddressFamily_it); + #endif /* _LIBCRYPTO_X509V3_H */ diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c index a3b28ac07a7..864b7bbf3dc 100644 --- a/lib/libcrypto/x509/x509_addr.c +++ b/lib/libcrypto/x509/x509_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_addr.c,v 1.91 2023/10/29 13:22:37 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.92 2024/07/08 14:47:44 beck Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -109,6 +109,7 @@ const ASN1_ITEM IPAddressRange_it = { .size = sizeof(IPAddressRange), .sname = "IPAddressRange", }; +LCRYPTO_ALIAS(IPAddressRange_it); static const ASN1_TEMPLATE IPAddressOrRange_ch_tt[] = { { @@ -136,6 +137,7 @@ const ASN1_ITEM IPAddressOrRange_it = { .size = sizeof(IPAddressOrRange), .sname = "IPAddressOrRange", }; +LCRYPTO_ALIAS(IPAddressOrRange_it); static const ASN1_TEMPLATE IPAddressChoice_ch_tt[] = { { @@ -163,6 +165,7 @@ const ASN1_ITEM IPAddressChoice_it = { .size = sizeof(IPAddressChoice), .sname = "IPAddressChoice", }; +LCRYPTO_ALIAS(IPAddressChoice_it); static const ASN1_TEMPLATE IPAddressFamily_seq_tt[] = { { @@ -190,6 +193,7 @@ const ASN1_ITEM IPAddressFamily_it = { .size = sizeof(IPAddressFamily), .sname = "IPAddressFamily", }; +LCRYPTO_ALIAS(IPAddressFamily_it); static const ASN1_TEMPLATE IPAddrBlocks_item_tt = { .flags = ASN1_TFLG_SEQUENCE_OF, diff --git a/lib/libcrypto/x509/x509_akeya.c b/lib/libcrypto/x509/x509_akeya.c index 52eca42cffd..e816e6b613c 100644 --- a/lib/libcrypto/x509/x509_akeya.c +++ b/lib/libcrypto/x509/x509_akeya.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_akeya.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_akeya.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -96,6 +96,7 @@ const ASN1_ITEM AUTHORITY_KEYID_it = { .size = sizeof(AUTHORITY_KEYID), .sname = "AUTHORITY_KEYID", }; +LCRYPTO_ALIAS(AUTHORITY_KEYID_it); AUTHORITY_KEYID * diff --git a/lib/libcrypto/x509/x509_asid.c b/lib/libcrypto/x509/x509_asid.c index 2fda58c3fa6..e3af673202f 100644 --- a/lib/libcrypto/x509/x509_asid.c +++ b/lib/libcrypto/x509/x509_asid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_asid.c,v 1.43 2024/02/20 14:58:16 tb Exp $ */ +/* $OpenBSD: x509_asid.c,v 1.44 2024/07/08 14:47:44 beck Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -102,6 +102,7 @@ const ASN1_ITEM ASRange_it = { .size = sizeof(ASRange), .sname = "ASRange", }; +LCRYPTO_ALIAS(ASRange_it); static const ASN1_TEMPLATE ASIdOrRange_ch_tt[] = { { @@ -129,6 +130,7 @@ const ASN1_ITEM ASIdOrRange_it = { .size = sizeof(ASIdOrRange), .sname = "ASIdOrRange", }; +LCRYPTO_ALIAS(ASIdOrRange_it); static const ASN1_TEMPLATE ASIdentifierChoice_ch_tt[] = { { @@ -156,6 +158,7 @@ const ASN1_ITEM ASIdentifierChoice_it = { .size = sizeof(ASIdentifierChoice), .sname = "ASIdentifierChoice", }; +LCRYPTO_ALIAS(ASIdentifierChoice_it); static const ASN1_TEMPLATE ASIdentifiers_seq_tt[] = { { @@ -183,6 +186,7 @@ const ASN1_ITEM ASIdentifiers_it = { .size = sizeof(ASIdentifiers), .sname = "ASIdentifiers", }; +LCRYPTO_ALIAS(ASIdentifiers_it); ASRange * d2i_ASRange(ASRange **a, const unsigned char **in, long len) diff --git a/lib/libcrypto/x509/x509_bcons.c b/lib/libcrypto/x509/x509_bcons.c index a39ae0aae0b..7ad65231ecb 100644 --- a/lib/libcrypto/x509/x509_bcons.c +++ b/lib/libcrypto/x509/x509_bcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_bcons.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_bcons.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -113,6 +113,7 @@ const ASN1_ITEM BASIC_CONSTRAINTS_it = { .size = sizeof(BASIC_CONSTRAINTS), .sname = "BASIC_CONSTRAINTS", }; +LCRYPTO_ALIAS(BASIC_CONSTRAINTS_it); BASIC_CONSTRAINTS * diff --git a/lib/libcrypto/x509/x509_cpols.c b/lib/libcrypto/x509/x509_cpols.c index bab2e99a934..34c9345a4fc 100644 --- a/lib/libcrypto/x509/x509_cpols.c +++ b/lib/libcrypto/x509/x509_cpols.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_cpols.c,v 1.11 2023/04/26 20:54:21 tb Exp $ */ +/* $OpenBSD: x509_cpols.c,v 1.12 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -116,6 +116,7 @@ const ASN1_ITEM CERTIFICATEPOLICIES_it = { .size = 0, .sname = "CERTIFICATEPOLICIES", }; +LCRYPTO_ALIAS(CERTIFICATEPOLICIES_it); CERTIFICATEPOLICIES * @@ -173,6 +174,7 @@ const ASN1_ITEM POLICYINFO_it = { .size = sizeof(POLICYINFO), .sname = "POLICYINFO", }; +LCRYPTO_ALIAS(POLICYINFO_it); POLICYINFO * @@ -270,6 +272,7 @@ const ASN1_ITEM POLICYQUALINFO_it = { .size = sizeof(POLICYQUALINFO), .sname = "POLICYQUALINFO", }; +LCRYPTO_ALIAS(POLICYQUALINFO_it); POLICYQUALINFO * @@ -327,6 +330,7 @@ const ASN1_ITEM USERNOTICE_it = { .size = sizeof(USERNOTICE), .sname = "USERNOTICE", }; +LCRYPTO_ALIAS(USERNOTICE_it); USERNOTICE * @@ -384,6 +388,7 @@ const ASN1_ITEM NOTICEREF_it = { .size = sizeof(NOTICEREF), .sname = "NOTICEREF", }; +LCRYPTO_ALIAS(NOTICEREF_it); NOTICEREF * diff --git a/lib/libcrypto/x509/x509_crld.c b/lib/libcrypto/x509/x509_crld.c index 7887ccd644e..dfb5d27f656 100644 --- a/lib/libcrypto/x509/x509_crld.c +++ b/lib/libcrypto/x509/x509_crld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_crld.c,v 1.5 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_crld.c,v 1.6 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -417,6 +417,7 @@ const ASN1_ITEM DIST_POINT_NAME_it = { .size = sizeof(DIST_POINT_NAME), .sname = "DIST_POINT_NAME", }; +LCRYPTO_ALIAS(DIST_POINT_NAME_it); @@ -482,6 +483,7 @@ const ASN1_ITEM DIST_POINT_it = { .size = sizeof(DIST_POINT), .sname = "DIST_POINT", }; +LCRYPTO_ALIAS(DIST_POINT_it); DIST_POINT * @@ -530,6 +532,7 @@ const ASN1_ITEM CRL_DIST_POINTS_it = { .size = 0, .sname = "CRL_DIST_POINTS", }; +LCRYPTO_ALIAS(CRL_DIST_POINTS_it); CRL_DIST_POINTS * @@ -615,6 +618,7 @@ const ASN1_ITEM ISSUING_DIST_POINT_it = { .size = sizeof(ISSUING_DIST_POINT), .sname = "ISSUING_DIST_POINT", }; +LCRYPTO_ALIAS(ISSUING_DIST_POINT_it); ISSUING_DIST_POINT * diff --git a/lib/libcrypto/x509/x509_extku.c b/lib/libcrypto/x509/x509_extku.c index 94032f624e7..f0f8d44aa66 100644 --- a/lib/libcrypto/x509/x509_extku.c +++ b/lib/libcrypto/x509/x509_extku.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_extku.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_extku.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -120,6 +120,7 @@ const ASN1_ITEM EXTENDED_KEY_USAGE_it = { .size = 0, .sname = "EXTENDED_KEY_USAGE", }; +LCRYPTO_ALIAS(EXTENDED_KEY_USAGE_it); EXTENDED_KEY_USAGE * diff --git a/lib/libcrypto/x509/x509_genn.c b/lib/libcrypto/x509/x509_genn.c index 556ba81c846..1ea71557959 100644 --- a/lib/libcrypto/x509/x509_genn.c +++ b/lib/libcrypto/x509/x509_genn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_genn.c,v 1.6 2023/04/25 15:51:04 tb Exp $ */ +/* $OpenBSD: x509_genn.c,v 1.7 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -90,6 +90,7 @@ const ASN1_ITEM OTHERNAME_it = { .size = sizeof(OTHERNAME), .sname = "OTHERNAME", }; +LCRYPTO_ALIAS(OTHERNAME_it); OTHERNAME * @@ -148,6 +149,7 @@ const ASN1_ITEM EDIPARTYNAME_it = { .size = sizeof(EDIPARTYNAME), .sname = "EDIPARTYNAME", }; +LCRYPTO_ALIAS(EDIPARTYNAME_it); EDIPARTYNAME * @@ -256,6 +258,7 @@ const ASN1_ITEM GENERAL_NAME_it = { .size = sizeof(GENERAL_NAME), .sname = "GENERAL_NAME", }; +LCRYPTO_ALIAS(GENERAL_NAME_it); GENERAL_NAME * @@ -304,6 +307,7 @@ const ASN1_ITEM GENERAL_NAMES_it = { .size = 0, .sname = "GENERAL_NAMES", }; +LCRYPTO_ALIAS(GENERAL_NAMES_it); GENERAL_NAMES * diff --git a/lib/libcrypto/x509/x509_info.c b/lib/libcrypto/x509/x509_info.c index a3d4d1bcc7b..9372b066aef 100644 --- a/lib/libcrypto/x509/x509_info.c +++ b/lib/libcrypto/x509/x509_info.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_info.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_info.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -131,6 +131,7 @@ const ASN1_ITEM ACCESS_DESCRIPTION_it = { .size = sizeof(ACCESS_DESCRIPTION), .sname = "ACCESS_DESCRIPTION", }; +LCRYPTO_ALIAS(ACCESS_DESCRIPTION_it); ACCESS_DESCRIPTION * @@ -179,6 +180,7 @@ const ASN1_ITEM AUTHORITY_INFO_ACCESS_it = { .size = 0, .sname = "AUTHORITY_INFO_ACCESS", }; +LCRYPTO_ALIAS(AUTHORITY_INFO_ACCESS_it); AUTHORITY_INFO_ACCESS * diff --git a/lib/libcrypto/x509/x509_ncons.c b/lib/libcrypto/x509/x509_ncons.c index 159e3c25636..f8c63886a4e 100644 --- a/lib/libcrypto/x509/x509_ncons.c +++ b/lib/libcrypto/x509/x509_ncons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_ncons.c,v 1.9 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_ncons.c,v 1.10 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -131,6 +131,7 @@ const ASN1_ITEM GENERAL_SUBTREE_it = { .size = sizeof(GENERAL_SUBTREE), .sname = "GENERAL_SUBTREE", }; +LCRYPTO_ALIAS(GENERAL_SUBTREE_it); static const ASN1_TEMPLATE NAME_CONSTRAINTS_seq_tt[] = { { @@ -158,6 +159,7 @@ const ASN1_ITEM NAME_CONSTRAINTS_it = { .size = sizeof(NAME_CONSTRAINTS), .sname = "NAME_CONSTRAINTS", }; +LCRYPTO_ALIAS(NAME_CONSTRAINTS_it); GENERAL_SUBTREE * diff --git a/lib/libcrypto/x509/x509_pcons.c b/lib/libcrypto/x509/x509_pcons.c index 0ee935540f8..8f2109eaad5 100644 --- a/lib/libcrypto/x509/x509_pcons.c +++ b/lib/libcrypto/x509/x509_pcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_pcons.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_pcons.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -114,6 +114,7 @@ const ASN1_ITEM POLICY_CONSTRAINTS_it = { .size = sizeof(POLICY_CONSTRAINTS), .sname = "POLICY_CONSTRAINTS", }; +LCRYPTO_ALIAS(POLICY_CONSTRAINTS_it); POLICY_CONSTRAINTS * diff --git a/lib/libcrypto/x509/x509_pku.c b/lib/libcrypto/x509/x509_pku.c index dd28077de10..05c9ff24312 100644 --- a/lib/libcrypto/x509/x509_pku.c +++ b/lib/libcrypto/x509/x509_pku.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_pku.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_pku.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -108,6 +108,7 @@ const ASN1_ITEM PKEY_USAGE_PERIOD_it = { .size = sizeof(PKEY_USAGE_PERIOD), .sname = "PKEY_USAGE_PERIOD", }; +LCRYPTO_ALIAS(PKEY_USAGE_PERIOD_it); PKEY_USAGE_PERIOD * diff --git a/lib/libcrypto/x509/x509_pmaps.c b/lib/libcrypto/x509/x509_pmaps.c index 39aebfee866..b2d74dce1d1 100644 --- a/lib/libcrypto/x509/x509_pmaps.c +++ b/lib/libcrypto/x509/x509_pmaps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_pmaps.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ +/* $OpenBSD: x509_pmaps.c,v 1.4 2024/07/08 14:47:44 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -112,6 +112,7 @@ const ASN1_ITEM POLICY_MAPPING_it = { .size = sizeof(POLICY_MAPPING), .sname = "POLICY_MAPPING", }; +LCRYPTO_ALIAS(POLICY_MAPPING_it); static const ASN1_TEMPLATE POLICY_MAPPINGS_item_tt = { .flags = ASN1_TFLG_SEQUENCE_OF, @@ -130,6 +131,7 @@ const ASN1_ITEM POLICY_MAPPINGS_it = { .size = 0, .sname = "POLICY_MAPPINGS", }; +LCRYPTO_ALIAS(POLICY_MAPPINGS_it); POLICY_MAPPING * -- 2.20.1