From 7bfedc8225359d9560fec5adadaf429dba518d55 Mon Sep 17 00:00:00 2001 From: joshua Date: Sat, 30 Mar 2024 01:53:05 +0000 Subject: [PATCH] Hide symbols in CMS ok jsing --- lib/libcrypto/Symbols.namespace | 8 ++++++++ lib/libcrypto/cms/cms_ess.c | 6 +++++- lib/libcrypto/cms/cms_io.c | 6 +++++- lib/libcrypto/cms/cms_lib.c | 3 ++- lib/libcrypto/hidden/openssl/cms.h | 11 ++++++++++- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 511cd626ba6..812a4280db0 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2591,3 +2591,11 @@ _libre_BF_ecb_encrypt _libre_BF_cbc_encrypt _libre_BF_cfb64_encrypt _libre_BF_ofb64_encrypt +_libre_PEM_read_bio_CMS +_libre_PEM_read_CMS +_libre_PEM_write_bio_CMS +_libre_PEM_write_CMS +_libre_CMS_get1_ReceiptRequest +_libre_CMS_ReceiptRequest_create0 +_libre_CMS_add1_ReceiptRequest +_libre_CMS_ReceiptRequest_get0_values diff --git a/lib/libcrypto/cms/cms_ess.c b/lib/libcrypto/cms/cms_ess.c index 16b54c19924..cced998545c 100644 --- a/lib/libcrypto/cms/cms_ess.c +++ b/lib/libcrypto/cms/cms_ess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms_ess.c,v 1.24 2024/01/14 18:40:24 tb Exp $ */ +/* $OpenBSD: cms_ess.c,v 1.25 2024/03/30 01:53:05 joshua Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. @@ -118,6 +118,7 @@ CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr) return 1; } +LCRYPTO_ALIAS(CMS_get1_ReceiptRequest); CMS_ReceiptRequest * CMS_ReceiptRequest_create0(unsigned char *id, int idlen, int allorfirst, @@ -155,6 +156,7 @@ CMS_ReceiptRequest_create0(unsigned char *id, int idlen, int allorfirst, return NULL; } +LCRYPTO_ALIAS(CMS_ReceiptRequest_create0); int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr) @@ -180,6 +182,7 @@ CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr) return r; } +LCRYPTO_ALIAS(CMS_add1_ReceiptRequest); void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid, @@ -202,6 +205,7 @@ CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr, ASN1_STRING **pcid, if (prto) *prto = rr->receiptsTo; } +LCRYPTO_ALIAS(CMS_ReceiptRequest_get0_values); /* Digest a SignerInfo structure for msgSigDigest attribute processing */ diff --git a/lib/libcrypto/cms/cms_io.c b/lib/libcrypto/cms/cms_io.c index ceb4ce8ecba..84ada47c49b 100644 --- a/lib/libcrypto/cms/cms_io.c +++ b/lib/libcrypto/cms/cms_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms_io.c,v 1.20 2023/07/08 08:26:26 beck Exp $ */ +/* $OpenBSD: cms_io.c,v 1.21 2024/03/30 01:53:05 joshua Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. @@ -105,6 +105,7 @@ PEM_read_bio_CMS(BIO *bp, CMS_ContentInfo **x, pem_password_cb *cb, void *u) return PEM_ASN1_read_bio((d2i_of_void *)d2i_CMS_ContentInfo, PEM_STRING_CMS, bp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_bio_CMS); CMS_ContentInfo * PEM_read_CMS(FILE *fp, CMS_ContentInfo **x, pem_password_cb *cb, void *u) @@ -112,6 +113,7 @@ PEM_read_CMS(FILE *fp, CMS_ContentInfo **x, pem_password_cb *cb, void *u) return PEM_ASN1_read((d2i_of_void *)d2i_CMS_ContentInfo, PEM_STRING_CMS, fp, (void **)x, cb, u); } +LCRYPTO_ALIAS(PEM_read_CMS); int PEM_write_bio_CMS(BIO *bp, const CMS_ContentInfo *x) @@ -119,6 +121,7 @@ PEM_write_bio_CMS(BIO *bp, const CMS_ContentInfo *x) return PEM_ASN1_write_bio((i2d_of_void *)i2d_CMS_ContentInfo, PEM_STRING_CMS, bp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_bio_CMS); int PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x) @@ -126,6 +129,7 @@ PEM_write_CMS(FILE *fp, const CMS_ContentInfo *x) return PEM_ASN1_write((i2d_of_void *)i2d_CMS_ContentInfo, PEM_STRING_CMS, fp, (void *)x, NULL, NULL, 0, NULL, NULL); } +LCRYPTO_ALIAS(PEM_write_CMS); BIO * BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) diff --git a/lib/libcrypto/cms/cms_lib.c b/lib/libcrypto/cms/cms_lib.c index 8a8fdbc8d5a..37eb3e294cf 100644 --- a/lib/libcrypto/cms/cms_lib.c +++ b/lib/libcrypto/cms/cms_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms_lib.c,v 1.24 2023/08/24 04:56:36 tb Exp $ */ +/* $OpenBSD: cms_lib.c,v 1.25 2024/03/30 01:53:05 joshua Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. @@ -314,6 +314,7 @@ CMS_get0_content(CMS_ContentInfo *cms) return NULL; } } +LCRYPTO_ALIAS(CMS_get0_content); /* * Return an ASN1_OBJECT pointer to content type. This allows it to be diff --git a/lib/libcrypto/hidden/openssl/cms.h b/lib/libcrypto/hidden/openssl/cms.h index 0f450e603ca..430b2c5355d 100644 --- a/lib/libcrypto/hidden/openssl/cms.h +++ b/lib/libcrypto/hidden/openssl/cms.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cms.h,v 1.2 2023/07/28 10:28:02 tb Exp $ */ +/* $OpenBSD: cms.h,v 1.3 2024/03/30 01:53:05 joshua Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -39,8 +39,13 @@ LCRYPTO_USED(CMS_get_version); LCRYPTO_USED(CMS_SignerInfo_get_version); LCRYPTO_USED(CMS_dataInit); LCRYPTO_USED(CMS_dataFinal); +LCRYPTO_USED(CMS_get0_content); LCRYPTO_USED(CMS_is_detached); LCRYPTO_USED(CMS_set_detached); +LCRYPTO_USED(PEM_read_bio_CMS); +LCRYPTO_USED(PEM_read_CMS); +LCRYPTO_USED(PEM_write_bio_CMS); +LCRYPTO_USED(PEM_write_CMS); LCRYPTO_USED(CMS_stream); LCRYPTO_USED(d2i_CMS_bio); LCRYPTO_USED(i2d_CMS_bio); @@ -133,6 +138,10 @@ LCRYPTO_USED(CMS_unsigned_add1_attr_by_OBJ); LCRYPTO_USED(CMS_unsigned_add1_attr_by_NID); LCRYPTO_USED(CMS_unsigned_add1_attr_by_txt); LCRYPTO_USED(CMS_unsigned_get0_data_by_OBJ); +LCRYPTO_USED(CMS_get1_ReceiptRequest); +LCRYPTO_USED(CMS_ReceiptRequest_create0); +LCRYPTO_USED(CMS_add1_ReceiptRequest); +LCRYPTO_USED(CMS_ReceiptRequest_get0_values); LCRYPTO_USED(CMS_RecipientInfo_kari_get0_alg); LCRYPTO_USED(CMS_RecipientInfo_kari_get0_reks); LCRYPTO_USED(CMS_RecipientInfo_kari_get0_orig_id); -- 2.20.1