// ASN.1 structure of CMS SignedData
//
// ContentInfo ::= SEQUENCE {
// contentType ContentType,
// content [0] EXPLICIT ANY DEFINED BY contentType
// }
//
// ContentType ::= OBJECT IDENTIFIER
//
// SignedData ::= SEQUENCE {
// version CMSVersion,
// digestAlgorithms DigestAlgorithmIdentifiers,
// encapContentInfo EncapsulatedContentInfo,
// certificates [0] IMPLICIT CertificateSet OPTIONAL,
// crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
// signerInfos SignerInfos
// }
//
// SignerInfos ::= SET OF SignerInfo
//
// CertificateSet ::= SET OF CertificateChoices
//
// DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
//
// RevocationInfoChoices ::= SET OF RevocationInfoChoice
//
// EncapsulatedContentInfo ::= SEQUENCE {
// eContentType ContentType,
// eContent [0] EXPLICIT OCTET STRING OPTIONAL
// }
//
// CertificateChoices ::= CHOICE {
// certificate Certificate,
// extendedCertificate [0] IMPLICIT ExtendedCertificate, -- Obsolete
// v1AttrCert [1] IMPLICIT AttributeCertificateV1, -- Obsolete
// v2AttrCert [2] IMPLICIT AttributeCertificateV2,
// other [3] IMPLICIT OtherCertificateFormat
// }
I try to parse this following ASN.1 structure
I am confused about
CHOICEand have no idea how to parse this kind of data structure. It's very pleased if anyone experienced with this data structure can help me out. Thanks in advance.