Skip to content

Commit

Permalink
Run clang-format on pkcs7 code
Browse files Browse the repository at this point in the history
Commands run:

```
$ clang-format -i crypto/pkcs7/*; echo $?
0

$ clang-format --version
Ubuntu clang-format version 14.0.0-1ubuntu1.1
ubuntu at ip-172-31-89-138 in ~/aws-lc on pkcs7-clang-fmt▲
```
  • Loading branch information
WillChilds-Klein committed Sep 5, 2024
1 parent 659d98e commit cd5ac4f
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 167 deletions.
66 changes: 33 additions & 33 deletions crypto/pkcs7/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ DEFINE_STACK_OF(PKCS7)
// [1] IMPLICIT CertificateRevocationLists OPTIONAL,
// signerInfos SignerInfos }
struct pkcs7_sign_envelope_st {
ASN1_INTEGER *version;
STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
STACK_OF(X509_ALGOR) *md_algs;
PKCS7_ENC_CONTENT *enc_data;
STACK_OF(X509) *cert;
STACK_OF(X509_CRL) *crl;
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
ASN1_INTEGER *version;
STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
STACK_OF(X509_ALGOR) *md_algs;
PKCS7_ENC_CONTENT *enc_data;
STACK_OF(X509) *cert;
STACK_OF(X509_CRL) *crl;
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
};

// ASN.1 defined here https://datatracker.ietf.org/doc/html/rfc2315#section-6.7
Expand All @@ -64,8 +64,8 @@ struct pkcs7_sign_envelope_st {
// issuer Name,
// serialNumber CertificateSerialNumber }
struct pkcs7_issuer_and_serial_st {
X509_NAME *issuer;
ASN1_INTEGER *serial;
X509_NAME *issuer;
ASN1_INTEGER *serial;
};

// ASN.1 defined here https://datatracker.ietf.org/doc/html/rfc2315#section-9.2
Expand All @@ -84,14 +84,14 @@ struct pkcs7_issuer_and_serial_st {
//
// EncryptedDigest ::= OCTET STRING
struct pkcs7_signer_info_st {
ASN1_INTEGER *version;
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
X509_ALGOR *digest_alg;
STACK_OF(X509_ATTRIBUTE) *auth_attr;
X509_ALGOR *digest_enc_alg;
ASN1_OCTET_STRING *enc_digest;
STACK_OF(X509_ATTRIBUTE) *unauth_attr;
EVP_PKEY *pkey; // NOTE: |pkey| is not seriliazed.
ASN1_INTEGER *version;
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
X509_ALGOR *digest_alg;
STACK_OF(X509_ATTRIBUTE) *auth_attr;
X509_ALGOR *digest_enc_alg;
ASN1_OCTET_STRING *enc_digest;
STACK_OF(X509_ATTRIBUTE) *unauth_attr;
EVP_PKEY *pkey; // NOTE: |pkey| is not seriliazed.
};

// ASN.1 defined here https://datatracker.ietf.org/doc/html/rfc2315#section-10.2
Expand All @@ -106,11 +106,11 @@ struct pkcs7_signer_info_st {
//
// EncryptedKey ::= OCTET STRING
struct pkcs7_recip_info_st {
ASN1_INTEGER *version;
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
X509_ALGOR *key_enc_algor;
ASN1_OCTET_STRING *enc_key;
X509 *cert; // NOTE: |cert| is not serialized
ASN1_INTEGER *version;
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
X509_ALGOR *key_enc_algor;
ASN1_OCTET_STRING *enc_key;
X509 *cert; // NOTE: |cert| is not serialized
};

// ASN.1 defined here https://datatracker.ietf.org/doc/html/rfc2315#section-10.1
Expand All @@ -124,10 +124,10 @@ struct pkcs7_recip_info_st {
//
// EncryptedContent ::= OCTET STRING
struct pkcs7_enc_content_st {
ASN1_OBJECT *content_type;
X509_ALGOR *algorithm;
ASN1_OCTET_STRING *enc_data;
const EVP_CIPHER *cipher; // NOTE: |cipher| is not serialized
ASN1_OBJECT *content_type;
X509_ALGOR *algorithm;
ASN1_OCTET_STRING *enc_data;
const EVP_CIPHER *cipher; // NOTE: |cipher| is not serialized
};

// ASN.1 defined here https://datatracker.ietf.org/doc/html/rfc2315#section-10.1
Expand All @@ -154,11 +154,11 @@ struct pkcs7_envelope_st {
//
// Digest ::= OCTET STRING
struct pkcs7_digest_st {
ASN1_INTEGER *version;
X509_ALGOR *digest_alg;
PKCS7 *contents;
ASN1_OCTET_STRING *digest;
const EVP_MD *md; // NOTE: |md| is not serialized
ASN1_INTEGER *version;
X509_ALGOR *digest_alg;
PKCS7 *contents;
ASN1_OCTET_STRING *digest;
const EVP_MD *md; // NOTE: |md| is not serialized
};

// ASN.1 defined here https://datatracker.ietf.org/doc/html/rfc2315#section-13
Expand All @@ -167,8 +167,8 @@ struct pkcs7_digest_st {
// version Version,
// encryptedContentInfo EncryptedContentInfo }
struct pkcs7_encrypt_st {
ASN1_INTEGER *version;
PKCS7_ENC_CONTENT *enc_data;
ASN1_INTEGER *version;
PKCS7_ENC_CONTENT *enc_data;
};

// pkcs7_parse_header reads the non-certificate/non-CRL prefix of a PKCS#7
Expand Down
5 changes: 2 additions & 3 deletions crypto/pkcs7/pkcs7.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <openssl/pool.h>
#include <openssl/stack.h>

#include "internal.h"
#include "../bytestring/internal.h"
#include "internal.h"


// 1.2.840.113549.1.7.1
Expand Down Expand Up @@ -109,8 +109,7 @@ int PKCS7_get_raw_certificates(STACK_OF(CRYPTO_BUFFER) *out_certs, CBS *cbs,
}

CRYPTO_BUFFER *buf = CRYPTO_BUFFER_new_from_CBS(&cert, pool);
if (buf == NULL ||
!sk_CRYPTO_BUFFER_push(out_certs, buf)) {
if (buf == NULL || !sk_CRYPTO_BUFFER_push(out_certs, buf)) {
CRYPTO_BUFFER_free(buf);
goto err;
}
Expand Down
183 changes: 92 additions & 91 deletions crypto/pkcs7/pkcs7_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@
#include <openssl/asn1t.h>
#include <openssl/pem.h>

#include "internal.h"
#include "../internal.h"
#include "../bytestring/internal.h"
#include "../internal.h"
#include "internal.h"

ASN1_ADB_TEMPLATE(p7default) = ASN1_EXP_OPT(PKCS7, d.other, ASN1_ANY, 0);

ASN1_ADB(PKCS7) = {
ADB_ENTRY(NID_pkcs7_data, ASN1_EXP_OPT(PKCS7, d.data, ASN1_OCTET_STRING, 0)),
ADB_ENTRY(NID_pkcs7_signed, ASN1_EXP_OPT(PKCS7, d.sign, PKCS7_SIGNED, 0)),
ADB_ENTRY(NID_pkcs7_enveloped, ASN1_EXP_OPT(PKCS7, d.enveloped, PKCS7_ENVELOPE, 0)),
ADB_ENTRY(NID_pkcs7_signedAndEnveloped, ASN1_EXP_OPT(PKCS7, d.signed_and_enveloped, PKCS7_SIGN_ENVELOPE, 0)),
ADB_ENTRY(NID_pkcs7_digest, ASN1_EXP_OPT(PKCS7, d.digest, PKCS7_DIGEST, 0)),
ADB_ENTRY(NID_pkcs7_encrypted, ASN1_EXP_OPT(PKCS7, d.encrypted, PKCS7_ENCRYPT, 0))
} ASN1_ADB_END(PKCS7, 0, type, 0, &p7default_tt, NULL);

ASN1_SEQUENCE(PKCS7) = {
ASN1_SIMPLE(PKCS7, type, ASN1_OBJECT),
ASN1_ADB_OBJECT(PKCS7)
} ASN1_SEQUENCE_END(PKCS7)
ADB_ENTRY(NID_pkcs7_data,
ASN1_EXP_OPT(PKCS7, d.data, ASN1_OCTET_STRING, 0)),
ADB_ENTRY(NID_pkcs7_signed, ASN1_EXP_OPT(PKCS7, d.sign, PKCS7_SIGNED, 0)),
ADB_ENTRY(NID_pkcs7_enveloped,
ASN1_EXP_OPT(PKCS7, d.enveloped, PKCS7_ENVELOPE, 0)),
ADB_ENTRY(NID_pkcs7_signedAndEnveloped,
ASN1_EXP_OPT(PKCS7, d.signed_and_enveloped, PKCS7_SIGN_ENVELOPE,
0)),
ADB_ENTRY(NID_pkcs7_digest, ASN1_EXP_OPT(PKCS7, d.digest, PKCS7_DIGEST, 0)),
ADB_ENTRY(
NID_pkcs7_encrypted,
ASN1_EXP_OPT(PKCS7, d.encrypted, PKCS7_ENCRYPT,
0))} ASN1_ADB_END(PKCS7, 0, type, 0, &p7default_tt, NULL);

ASN1_SEQUENCE(PKCS7) = {ASN1_SIMPLE(PKCS7, type, ASN1_OBJECT),
ASN1_ADB_OBJECT(PKCS7)} ASN1_SEQUENCE_END(PKCS7)

IMPLEMENT_ASN1_ALLOC_FUNCTIONS(PKCS7)

Expand All @@ -41,26 +45,23 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len) {
// |CBS_asn1_ber_to_der| will allocate memory and point |der_bytes| to it.
// we're responsible for freeing this below.
if (!CBS_asn1_ber_to_der(&cbs, &cbs_der, &der_bytes)) {
goto err;
goto err;
}

// |CBS_asn1_ber_to_der| will set |der_bytes| to NULL if it doesn't detect
// any convertible BER elements in |in|.
if (der_bytes == NULL) {
ret = (PKCS7 *) ASN1_item_d2i(
(ASN1_VALUE **) a, in, len,
ASN1_ITEM_rptr(PKCS7)
);
ret = (PKCS7 *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
ASN1_ITEM_rptr(PKCS7));
} else {
// |ASN1_item_d2i| will increment the input pointer by |der_len| length, so
// save off another pointer so we can free |der_bytes| at the end of this
// function.
uint8_t *der_bytes_ptr = der_bytes;
size_t der_len = CBS_len(&cbs_der);
ret = (PKCS7 *) ASN1_item_d2i(
(ASN1_VALUE **) a, (const uint8_t**) &der_bytes_ptr,
der_len, ASN1_ITEM_rptr(PKCS7)
);
ret = (PKCS7 *)ASN1_item_d2i((ASN1_VALUE **)a,
(const uint8_t **)&der_bytes_ptr, der_len,
ASN1_ITEM_rptr(PKCS7));
// Advance |*in| by however many bytes |ASN1_item_d2i| advanced
// |der_bytes_ptr|
*in += der_bytes_ptr - der_bytes;
Expand All @@ -73,117 +74,117 @@ PKCS7 *d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len) {
}

int i2d_PKCS7(PKCS7 *a, unsigned char **out) {
return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(PKCS7));
return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(PKCS7));
}

IMPLEMENT_ASN1_DUP_FUNCTION(PKCS7)

ASN1_SEQUENCE(PKCS7_SIGNED) = {
ASN1_SIMPLE(PKCS7_SIGNED, version, ASN1_INTEGER),
ASN1_SET_OF(PKCS7_SIGNED, md_algs, X509_ALGOR),
ASN1_SIMPLE(PKCS7_SIGNED, contents, PKCS7),
ASN1_IMP_SEQUENCE_OF_OPT(PKCS7_SIGNED, cert, X509, 0),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGNED, crl, X509_CRL, 1),
ASN1_SET_OF(PKCS7_SIGNED, signer_info, PKCS7_SIGNER_INFO)
} ASN1_SEQUENCE_END(PKCS7_SIGNED)
ASN1_SIMPLE(PKCS7_SIGNED, version, ASN1_INTEGER),
ASN1_SET_OF(PKCS7_SIGNED, md_algs, X509_ALGOR),
ASN1_SIMPLE(PKCS7_SIGNED, contents, PKCS7),
ASN1_IMP_SEQUENCE_OF_OPT(PKCS7_SIGNED, cert, X509, 0),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGNED, crl, X509_CRL, 1),
ASN1_SET_OF(PKCS7_SIGNED, signer_info,
PKCS7_SIGNER_INFO)} ASN1_SEQUENCE_END(PKCS7_SIGNED)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_SIGNED)

ASN1_SEQUENCE(PKCS7_ISSUER_AND_SERIAL) = {
ASN1_SIMPLE(PKCS7_ISSUER_AND_SERIAL, issuer, X509_NAME),
ASN1_SIMPLE(PKCS7_ISSUER_AND_SERIAL, serial, ASN1_INTEGER)
} ASN1_SEQUENCE_END(PKCS7_ISSUER_AND_SERIAL)
ASN1_SIMPLE(PKCS7_ISSUER_AND_SERIAL, issuer, X509_NAME),
ASN1_SIMPLE(PKCS7_ISSUER_AND_SERIAL, serial,
ASN1_INTEGER)} ASN1_SEQUENCE_END(PKCS7_ISSUER_AND_SERIAL)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)

// Minor tweak to operation: free up X509.
static int recip_info_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
void *exarg)
{
if (operation == ASN1_OP_FREE_POST) {
PKCS7_RECIP_INFO *ri = (PKCS7_RECIP_INFO *)*pval;
X509_free(ri->cert);
}
return 1;
void *exarg) {
if (operation == ASN1_OP_FREE_POST) {
PKCS7_RECIP_INFO *ri = (PKCS7_RECIP_INFO *)*pval;
X509_free(ri->cert);
}
return 1;
}

ASN1_SEQUENCE_cb(PKCS7_RECIP_INFO, recip_info_cb) = {
ASN1_SIMPLE(PKCS7_RECIP_INFO, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_RECIP_INFO, issuer_and_serial, PKCS7_ISSUER_AND_SERIAL),
ASN1_SIMPLE(PKCS7_RECIP_INFO, key_enc_algor, X509_ALGOR),
ASN1_SIMPLE(PKCS7_RECIP_INFO, enc_key, ASN1_OCTET_STRING)
} ASN1_SEQUENCE_END_cb(PKCS7_RECIP_INFO, PKCS7_RECIP_INFO)
ASN1_SEQUENCE_cb(PKCS7_RECIP_INFO, recip_info_cb) =
{ASN1_SIMPLE(PKCS7_RECIP_INFO, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_RECIP_INFO, issuer_and_serial, PKCS7_ISSUER_AND_SERIAL),
ASN1_SIMPLE(PKCS7_RECIP_INFO, key_enc_algor, X509_ALGOR),
ASN1_SIMPLE(PKCS7_RECIP_INFO, enc_key,
ASN1_OCTET_STRING)} ASN1_SEQUENCE_END_cb(PKCS7_RECIP_INFO,
PKCS7_RECIP_INFO)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)

// Minor tweak to operation: free up EVP_PKEY.
static int signer_info_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
void *exarg)
{
PKCS7_SIGNER_INFO *si = (PKCS7_SIGNER_INFO *)*pval;
if (operation == ASN1_OP_FREE_POST) {
EVP_PKEY_free(si->pkey);
}
return 1;
void *exarg) {
PKCS7_SIGNER_INFO *si = (PKCS7_SIGNER_INFO *)*pval;
if (operation == ASN1_OP_FREE_POST) {
EVP_PKEY_free(si->pkey);
}
return 1;
}

ASN1_SEQUENCE_cb(PKCS7_SIGNER_INFO, signer_info_cb) = {
ASN1_SIMPLE(PKCS7_SIGNER_INFO, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, issuer_and_serial, PKCS7_ISSUER_AND_SERIAL),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, digest_alg, X509_ALGOR),
/* NB this should be a SET OF but we use a SEQUENCE OF so the
* original order * is retained when the structure is reencoded.
* Since the attributes are implicitly tagged this will not affect
* the encoding.
*/
ASN1_IMP_SEQUENCE_OF_OPT(PKCS7_SIGNER_INFO, auth_attr, X509_ATTRIBUTE, 0),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, digest_enc_alg, X509_ALGOR),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, enc_digest, ASN1_OCTET_STRING),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGNER_INFO, unauth_attr, X509_ATTRIBUTE, 1)
} ASN1_SEQUENCE_END_cb(PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO)
ASN1_SIMPLE(PKCS7_SIGNER_INFO, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, issuer_and_serial, PKCS7_ISSUER_AND_SERIAL),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, digest_alg, X509_ALGOR),
/* NB this should be a SET OF but we use a SEQUENCE OF so the
* original order * is retained when the structure is reencoded.
* Since the attributes are implicitly tagged this will not affect
* the encoding.
*/
ASN1_IMP_SEQUENCE_OF_OPT(PKCS7_SIGNER_INFO, auth_attr, X509_ATTRIBUTE, 0),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, digest_enc_alg, X509_ALGOR),
ASN1_SIMPLE(PKCS7_SIGNER_INFO, enc_digest, ASN1_OCTET_STRING),
ASN1_IMP_SET_OF_OPT(
PKCS7_SIGNER_INFO, unauth_attr, X509_ATTRIBUTE,
1)} ASN1_SEQUENCE_END_cb(PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)

ASN1_SEQUENCE(PKCS7_ENC_CONTENT) = {
ASN1_SIMPLE(PKCS7_ENC_CONTENT, content_type, ASN1_OBJECT),
ASN1_SIMPLE(PKCS7_ENC_CONTENT, algorithm, X509_ALGOR),
ASN1_IMP_OPT(PKCS7_ENC_CONTENT, enc_data, ASN1_OCTET_STRING, 0)
} ASN1_SEQUENCE_END(PKCS7_ENC_CONTENT)
ASN1_SIMPLE(PKCS7_ENC_CONTENT, content_type, ASN1_OBJECT),
ASN1_SIMPLE(PKCS7_ENC_CONTENT, algorithm, X509_ALGOR),
ASN1_IMP_OPT(PKCS7_ENC_CONTENT, enc_data, ASN1_OCTET_STRING,
0)} ASN1_SEQUENCE_END(PKCS7_ENC_CONTENT)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)

ASN1_SEQUENCE(PKCS7_SIGN_ENVELOPE) = {
ASN1_SIMPLE(PKCS7_SIGN_ENVELOPE, version, ASN1_INTEGER),
ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, recipientinfo, PKCS7_RECIP_INFO),
ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, md_algs, X509_ALGOR),
ASN1_SIMPLE(PKCS7_SIGN_ENVELOPE, enc_data, PKCS7_ENC_CONTENT),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGN_ENVELOPE, cert, X509, 0),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGN_ENVELOPE, crl, X509_CRL, 1),
ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, signer_info, PKCS7_SIGNER_INFO)
} ASN1_SEQUENCE_END(PKCS7_SIGN_ENVELOPE)
ASN1_SIMPLE(PKCS7_SIGN_ENVELOPE, version, ASN1_INTEGER),
ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, recipientinfo, PKCS7_RECIP_INFO),
ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, md_algs, X509_ALGOR),
ASN1_SIMPLE(PKCS7_SIGN_ENVELOPE, enc_data, PKCS7_ENC_CONTENT),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGN_ENVELOPE, cert, X509, 0),
ASN1_IMP_SET_OF_OPT(PKCS7_SIGN_ENVELOPE, crl, X509_CRL, 1),
ASN1_SET_OF(PKCS7_SIGN_ENVELOPE, signer_info,
PKCS7_SIGNER_INFO)} ASN1_SEQUENCE_END(PKCS7_SIGN_ENVELOPE)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)

ASN1_SEQUENCE(PKCS7_ENCRYPT) = {
ASN1_SIMPLE(PKCS7_ENCRYPT, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_ENCRYPT, enc_data, PKCS7_ENC_CONTENT)
} ASN1_SEQUENCE_END(PKCS7_ENCRYPT)
ASN1_SIMPLE(PKCS7_ENCRYPT, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_ENCRYPT, enc_data,
PKCS7_ENC_CONTENT)} ASN1_SEQUENCE_END(PKCS7_ENCRYPT)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ENCRYPT)

ASN1_SEQUENCE(PKCS7_DIGEST) = {
ASN1_SIMPLE(PKCS7_DIGEST, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_DIGEST, md, X509_ALGOR),
ASN1_SIMPLE(PKCS7_DIGEST, contents, PKCS7),
ASN1_SIMPLE(PKCS7_DIGEST, digest, ASN1_OCTET_STRING)
} ASN1_SEQUENCE_END(PKCS7_DIGEST)
ASN1_SIMPLE(PKCS7_DIGEST, version, ASN1_INTEGER),
ASN1_SIMPLE(PKCS7_DIGEST, md, X509_ALGOR),
ASN1_SIMPLE(PKCS7_DIGEST, contents, PKCS7),
ASN1_SIMPLE(PKCS7_DIGEST, digest,
ASN1_OCTET_STRING)} ASN1_SEQUENCE_END(PKCS7_DIGEST)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_DIGEST)

ASN1_SEQUENCE(PKCS7_ENVELOPE) = {
ASN1_SIMPLE(PKCS7_ENVELOPE, version, ASN1_INTEGER),
ASN1_SET_OF(PKCS7_ENVELOPE, recipientinfo, PKCS7_RECIP_INFO),
ASN1_SIMPLE(PKCS7_ENVELOPE, enc_data, PKCS7_ENC_CONTENT)
} ASN1_SEQUENCE_END(PKCS7_ENVELOPE)
ASN1_SIMPLE(PKCS7_ENVELOPE, version, ASN1_INTEGER),
ASN1_SET_OF(PKCS7_ENVELOPE, recipientinfo, PKCS7_RECIP_INFO),
ASN1_SIMPLE(PKCS7_ENVELOPE, enc_data,
PKCS7_ENC_CONTENT)} ASN1_SEQUENCE_END(PKCS7_ENVELOPE)

IMPLEMENT_ASN1_FUNCTIONS(PKCS7_ENVELOPE)
Loading

0 comments on commit cd5ac4f

Please sign in to comment.