From e2adc6fbaec04d13df435800dbe1f6f2b1123862 Mon Sep 17 00:00:00 2001 From: beck Date: Mon, 8 Jul 2024 14:53:11 +0000 Subject: [PATCH] Hide global _it variables in ocsp.h ok tb@ --- lib/libcrypto/Symbols.namespace | 16 ++++++++++++++++ lib/libcrypto/hidden/openssl/ocsp.h | 18 +++++++++++++++++- lib/libcrypto/ocsp/ocsp_asn.c | 17 ++++++++++++++++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 8e0760f8e61..5e502dd0419 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -3294,3 +3294,19 @@ _libre_ASN1_GENERALSTRING_it _libre_ASN1_UTCTIME_it _libre_ASN1_GENERALIZEDTIME_it _libre_ASN1_TIME_it +_libre_OCSP_RESPID_it +_libre_OCSP_SINGLERESP_it +_libre_OCSP_CERTSTATUS_it +_libre_OCSP_REVOKEDINFO_it +_libre_OCSP_BASICRESP_it +_libre_OCSP_RESPDATA_it +_libre_OCSP_RESPID_it +_libre_OCSP_RESPONSE_it +_libre_OCSP_RESPBYTES_it +_libre_OCSP_ONEREQ_it +_libre_OCSP_CERTID_it +_libre_OCSP_REQUEST_it +_libre_OCSP_SIGNATURE_it +_libre_OCSP_REQINFO_it +_libre_OCSP_CRLID_it +_libre_OCSP_SERVICELOC_it diff --git a/lib/libcrypto/hidden/openssl/ocsp.h b/lib/libcrypto/hidden/openssl/ocsp.h index 654696224fe..c25f4ad75eb 100644 --- a/lib/libcrypto/hidden/openssl/ocsp.h +++ b/lib/libcrypto/hidden/openssl/ocsp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp.h,v 1.1 2023/07/08 10:44:00 beck Exp $ */ +/* $OpenBSD: ocsp.h,v 1.2 2024/07/08 14:53:11 beck Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -186,5 +186,21 @@ LCRYPTO_USED(OCSP_REQUEST_print); LCRYPTO_USED(OCSP_RESPONSE_print); LCRYPTO_USED(OCSP_basic_verify); LCRYPTO_USED(ERR_load_OCSP_strings); +extern LCRYPTO_USED(OCSP_RESPID_it); +extern LCRYPTO_USED(OCSP_SINGLERESP_it); +extern LCRYPTO_USED(OCSP_CERTSTATUS_it); +extern LCRYPTO_USED(OCSP_REVOKEDINFO_it); +extern LCRYPTO_USED(OCSP_BASICRESP_it); +extern LCRYPTO_USED(OCSP_RESPDATA_it); +extern LCRYPTO_USED(OCSP_RESPID_it); +extern LCRYPTO_USED(OCSP_RESPONSE_it); +extern LCRYPTO_USED(OCSP_RESPBYTES_it); +extern LCRYPTO_USED(OCSP_ONEREQ_it); +extern LCRYPTO_USED(OCSP_CERTID_it); +extern LCRYPTO_USED(OCSP_REQUEST_it); +extern LCRYPTO_USED(OCSP_SIGNATURE_it); +extern LCRYPTO_USED(OCSP_REQINFO_it); +extern LCRYPTO_USED(OCSP_CRLID_it); +extern LCRYPTO_USED(OCSP_SERVICELOC_it); #endif /* _LIBCRYPTO_OCSP_H */ diff --git a/lib/libcrypto/ocsp/ocsp_asn.c b/lib/libcrypto/ocsp/ocsp_asn.c index 4fbdd5fd7f2..abceaac832e 100644 --- a/lib/libcrypto/ocsp/ocsp_asn.c +++ b/lib/libcrypto/ocsp/ocsp_asn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_asn.c,v 1.11 2023/07/08 10:44:00 beck Exp $ */ +/* $OpenBSD: ocsp_asn.c,v 1.12 2024/07/08 14:53:11 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -94,6 +94,7 @@ const ASN1_ITEM OCSP_SIGNATURE_it = { .size = sizeof(OCSP_SIGNATURE), .sname = "OCSP_SIGNATURE", }; +LCRYPTO_ALIAS(OCSP_SIGNATURE_it); OCSP_SIGNATURE * @@ -165,6 +166,7 @@ const ASN1_ITEM OCSP_CERTID_it = { .size = sizeof(OCSP_CERTID), .sname = "OCSP_CERTID", }; +LCRYPTO_ALIAS(OCSP_CERTID_it); OCSP_CERTID * @@ -222,6 +224,7 @@ const ASN1_ITEM OCSP_ONEREQ_it = { .size = sizeof(OCSP_ONEREQ), .sname = "OCSP_ONEREQ", }; +LCRYPTO_ALIAS(OCSP_ONEREQ_it); OCSP_ONEREQ * @@ -293,6 +296,7 @@ const ASN1_ITEM OCSP_REQINFO_it = { .size = sizeof(OCSP_REQINFO), .sname = "OCSP_REQINFO", }; +LCRYPTO_ALIAS(OCSP_REQINFO_it); OCSP_REQINFO * @@ -350,6 +354,7 @@ const ASN1_ITEM OCSP_REQUEST_it = { .size = sizeof(OCSP_REQUEST), .sname = "OCSP_REQUEST", }; +LCRYPTO_ALIAS(OCSP_REQUEST_it); OCSP_REQUEST * d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len) @@ -422,6 +427,7 @@ const ASN1_ITEM OCSP_RESPBYTES_it = { .size = sizeof(OCSP_RESPBYTES), .sname = "OCSP_RESPBYTES", }; +LCRYPTO_ALIAS(OCSP_RESPBYTES_it); OCSP_RESPBYTES * @@ -479,6 +485,7 @@ const ASN1_ITEM OCSP_RESPONSE_it = { .size = sizeof(OCSP_RESPONSE), .sname = "OCSP_RESPONSE", }; +LCRYPTO_ALIAS(OCSP_RESPONSE_it); OCSP_RESPONSE * @@ -550,6 +557,7 @@ const ASN1_ITEM OCSP_RESPID_it = { .size = sizeof(OCSP_RESPID), .sname = "OCSP_RESPID", }; +LCRYPTO_ALIAS(OCSP_RESPID_it); OCSP_RESPID * @@ -607,6 +615,7 @@ const ASN1_ITEM OCSP_REVOKEDINFO_it = { .size = sizeof(OCSP_REVOKEDINFO), .sname = "OCSP_REVOKEDINFO", }; +LCRYPTO_ALIAS(OCSP_REVOKEDINFO_it); OCSP_REVOKEDINFO * @@ -671,6 +680,7 @@ const ASN1_ITEM OCSP_CERTSTATUS_it = { .size = sizeof(OCSP_CERTSTATUS), .sname = "OCSP_CERTSTATUS", }; +LCRYPTO_ALIAS(OCSP_CERTSTATUS_it); OCSP_CERTSTATUS * @@ -749,6 +759,7 @@ const ASN1_ITEM OCSP_SINGLERESP_it = { .size = sizeof(OCSP_SINGLERESP), .sname = "OCSP_SINGLERESP", }; +LCRYPTO_ALIAS(OCSP_SINGLERESP_it); OCSP_SINGLERESP * @@ -827,6 +838,7 @@ const ASN1_ITEM OCSP_RESPDATA_it = { .size = sizeof(OCSP_RESPDATA), .sname = "OCSP_RESPDATA", }; +LCRYPTO_ALIAS(OCSP_RESPDATA_it); OCSP_RESPDATA * @@ -898,6 +910,7 @@ const ASN1_ITEM OCSP_BASICRESP_it = { .size = sizeof(OCSP_BASICRESP), .sname = "OCSP_BASICRESP", }; +LCRYPTO_ALIAS(OCSP_BASICRESP_it); OCSP_BASICRESP * @@ -962,6 +975,7 @@ const ASN1_ITEM OCSP_CRLID_it = { .size = sizeof(OCSP_CRLID), .sname = "OCSP_CRLID", }; +LCRYPTO_ALIAS(OCSP_CRLID_it); OCSP_CRLID * @@ -1019,6 +1033,7 @@ const ASN1_ITEM OCSP_SERVICELOC_it = { .size = sizeof(OCSP_SERVICELOC), .sname = "OCSP_SERVICELOC", }; +LCRYPTO_ALIAS(OCSP_SERVICELOC_it); OCSP_SERVICELOC * -- 2.20.1