Skip to content

Commit

Permalink
Adjust struct visibility per PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
WillChilds-Klein committed Aug 27, 2024
1 parent a1d7155 commit e9f7420
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions crypto/pkcs7/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@ extern "C" {

typedef struct pkcs7_issuer_and_serial_st PKCS7_ISSUER_AND_SERIAL;
typedef struct pkcs7_enc_content_st PKCS7_ENC_CONTENT;
typedef struct pkcs7_recip_info_st PKCS7_RECIP_INFO;

DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)
DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED)
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)
DECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)
DECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT)
DECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE)
DECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST)
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)

DEFINE_STACK_OF(PKCS7)
DEFINE_STACK_OF(PKCS7_RECIP_INFO)
DEFINE_STACK_OF(PKCS7_SIGNER_INFO)

struct pkcs7_sign_envelope_st {
ASN1_INTEGER *version;
Expand Down
8 changes: 8 additions & 0 deletions include/openssl/pkcs7.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ typedef struct pkcs7_envelope_st PKCS7_ENVELOPE;
typedef struct pkcs7_sign_envelope_st PKCS7_SIGN_ENVELOPE;
typedef struct pkcs7_digest_st PKCS7_DIGEST;
typedef struct pkcs7_encrypt_st PKCS7_ENCRYPT;
typedef struct pkcs7_recip_info_st PKCS7_RECIP_INFO;
typedef struct pkcs7_signer_info_st PKCS7_SIGNER_INFO;

struct pkcs7_st {
Expand Down Expand Up @@ -141,7 +142,14 @@ struct pkcs7_signed_st {
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
};

// Only declare ASN1 functions or define stacks publibly if needed by supported
// projects that depend on them.
DECLARE_ASN1_FUNCTIONS(PKCS7)
DECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)
DECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)

DEFINE_STACK_OF(PKCS7_RECIP_INFO)
DEFINE_STACK_OF(PKCS7_SIGNER_INFO)

// PKCS7_dup returns a newly allocated copy of |p7| without deep-copying
// internal references.
Expand Down

0 comments on commit e9f7420

Please sign in to comment.