From 390e61a47a0f9b369e80c413add2a1cde3230d8e Mon Sep 17 00:00:00 2001 From: Nick Child Date: Mon, 9 Aug 2021 13:33:14 -0400 Subject: [PATCH] pkcs7.h: Make pkcs7 fields private All fields in the mbedtls_pkcs7 struct have been made private with MBEDTLS_PRIVATE. Signed-off-by: Nick Child --- include/mbedtls/pkcs7.h | 46 +++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/include/mbedtls/pkcs7.h b/include/mbedtls/pkcs7.h index 59da147b9..29bb503a7 100644 --- a/include/mbedtls/pkcs7.h +++ b/include/mbedtls/pkcs7.h @@ -46,6 +46,8 @@ #ifndef MBEDTLS_PKCS7_H #define MBEDTLS_PKCS7_H +#include "mbedtls/private_access.h" + #include "mbedtls/build_info.h" #include "asn1.h" @@ -115,14 +117,14 @@ mbedtls_pkcs7_type; */ typedef struct mbedtls_pkcs7_signer_info { - int version; - mbedtls_x509_buf serial; - mbedtls_x509_name issuer; - mbedtls_x509_buf issuer_raw; - mbedtls_x509_buf alg_identifier; - mbedtls_x509_buf sig_alg_identifier; - mbedtls_x509_buf sig; - struct mbedtls_pkcs7_signer_info *next; + int MBEDTLS_PRIVATE(version); + mbedtls_x509_buf MBEDTLS_PRIVATE(serial); + mbedtls_x509_name MBEDTLS_PRIVATE(issuer); + mbedtls_x509_buf MBEDTLS_PRIVATE(issuer_raw); + mbedtls_x509_buf MBEDTLS_PRIVATE(alg_identifier); + mbedtls_x509_buf MBEDTLS_PRIVATE(sig_alg_identifier); + mbedtls_x509_buf MBEDTLS_PRIVATE(sig); + struct mbedtls_pkcs7_signer_info *MBEDTLS_PRIVATE(next); } mbedtls_pkcs7_signer_info; @@ -131,8 +133,8 @@ mbedtls_pkcs7_signer_info; */ typedef struct mbedtls_pkcs7_data { - mbedtls_pkcs7_buf oid; - mbedtls_pkcs7_buf data; + mbedtls_pkcs7_buf MBEDTLS_PRIVATE(oid); + mbedtls_pkcs7_buf MBEDTLS_PRIVATE(data); } mbedtls_pkcs7_data; @@ -141,15 +143,15 @@ mbedtls_pkcs7_data; */ typedef struct mbedtls_pkcs7_signed_data { - int version; - mbedtls_pkcs7_buf digest_alg_identifiers; - struct mbedtls_pkcs7_data content; - int no_of_certs; - mbedtls_x509_crt certs; - int no_of_crls; - mbedtls_x509_crl crl; - int no_of_signers; - mbedtls_pkcs7_signer_info signers; + int MBEDTLS_PRIVATE(version); + mbedtls_pkcs7_buf MBEDTLS_PRIVATE(digest_alg_identifiers); + struct mbedtls_pkcs7_data MBEDTLS_PRIVATE(content); + int MBEDTLS_PRIVATE(no_of_certs); + mbedtls_x509_crt MBEDTLS_PRIVATE(certs); + int MBEDTLS_PRIVATE(no_of_crls); + mbedtls_x509_crl MBEDTLS_PRIVATE(crl); + int MBEDTLS_PRIVATE(no_of_signers); + mbedtls_pkcs7_signer_info MBEDTLS_PRIVATE(signers); } mbedtls_pkcs7_signed_data; @@ -158,9 +160,9 @@ mbedtls_pkcs7_signed_data; */ typedef struct mbedtls_pkcs7 { - mbedtls_pkcs7_buf raw; - mbedtls_pkcs7_buf content_type_oid; - mbedtls_pkcs7_signed_data signed_data; + mbedtls_pkcs7_buf MBEDTLS_PRIVATE(raw); + mbedtls_pkcs7_buf MBEDTLS_PRIVATE(content_type_oid); + mbedtls_pkcs7_signed_data MBEDTLS_PRIVATE(signed_data); } mbedtls_pkcs7;