mirrored from https://www.bouncycastle.org/repositories/pc-dart
-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
I try to parse this following ASN.1 structure
// 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 am confused about CHOICE and 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.
Metadata
Metadata
Assignees
Labels
No labels