internal static void Decode(ref AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory <byte> rebind, out SigningCertificateV2Asn decoded) { decoded = default; AsnValueReader sequenceReader = reader.ReadSequence(expectedTag); AsnValueReader collectionReader; // Decode SEQUENCE OF for Certs { collectionReader = sequenceReader.ReadSequence(); var tmpList = new List <EssCertIdV2>(); EssCertIdV2 tmpItem; while (collectionReader.HasData) { EssCertIdV2.Decode(ref collectionReader, rebind, out tmpItem); tmpList.Add(tmpItem); } decoded.Certs = tmpList.ToArray(); } if (sequenceReader.HasData && sequenceReader.PeekTag().HasSameClassAndValue(Asn1Tag.Sequence)) { // Decode SEQUENCE OF for Policies { collectionReader = sequenceReader.ReadSequence(); var tmpList = new List <PolicyInformation>(); PolicyInformation tmpItem; while (collectionReader.HasData) { PolicyInformation.Decode(ref collectionReader, rebind, out tmpItem); tmpList.Add(tmpItem); } decoded.Policies = tmpList.ToArray(); } } sequenceReader.ThrowIfNotEmpty(); }
internal static void Decode(ref AsnValueReader reader, ReadOnlyMemory <byte> rebind, out SigningCertificateV2Asn decoded) { Decode(ref reader, Asn1Tag.Sequence, rebind, out decoded); }