|
3 | 3 | // to PKCS #7 format from another encoding such as PEM conforms to this implementation. |
4 | 4 | // reference: https://www.openssl.org/docs/man1.1.0/apps/crl2pkcs7.html |
5 | 5 | // |
6 | | -// PKCS #7 Data type, reference: https://tools.ietf.org/html/rfc2315 |
| 6 | +// PKCS #7 Data type, reference: https://tools.ietf.org/html/rfc2315 |
7 | 7 | // |
8 | 8 | // The full pkcs#7 cryptographic message syntax allows for cryptographic enhancements, |
9 | 9 | // for example data can be encrypted and signed and then packaged through pkcs#7 to be |
10 | 10 | // sent over a network and then verified and decrypted. It is asn1, and the type of |
11 | 11 | // PKCS #7 ContentInfo, which comprises the PKCS #7 structure, is: |
12 | 12 | // |
13 | | -// ContentInfo ::= SEQUENCE { |
14 | | -// contentType ContentType, |
15 | | -// content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL |
16 | | -// } |
| 13 | +// ContentInfo ::= SEQUENCE { |
| 14 | +// contentType ContentType, |
| 15 | +// content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL |
| 16 | +// } |
17 | 17 | // |
18 | 18 | // There are 6 possible ContentTypes, data, signedData, envelopedData, |
19 | 19 | // signedAndEnvelopedData, digestedData, and encryptedData. Here signedData, Data, and encrypted |
|
22 | 22 | // formats. |
23 | 23 | // The ContentType signedData has the form: |
24 | 24 | // |
25 | | -// |
26 | | -// signedData ::= SEQUENCE { |
27 | | -// version Version, |
28 | | -// digestAlgorithms DigestAlgorithmIdentifiers, |
29 | | -// contentInfo ContentInfo, |
30 | | -// certificates [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL |
31 | | -// crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, |
32 | | -// signerInfos SignerInfos |
33 | | -// } |
| 25 | +// signedData ::= SEQUENCE { |
| 26 | +// version Version, |
| 27 | +// digestAlgorithms DigestAlgorithmIdentifiers, |
| 28 | +// contentInfo ContentInfo, |
| 29 | +// certificates [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL |
| 30 | +// crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, |
| 31 | +// signerInfos SignerInfos |
| 32 | +// } |
34 | 33 | // |
35 | 34 | // As of yet signerInfos and digestAlgorithms are not parsed, as they are not relevant to |
36 | 35 | // this system's use of PKCS #7 data. Version is an integer type, note that PKCS #7 is |
|
0 commit comments