internal static void Decode(ref AsnValueReader reader, Asn1Tag expectedTag, ReadOnlyMemory <byte> rebind, out SigningCertificateAsn decoded) { decoded = default; AsnValueReader sequenceReader = reader.ReadSequence(expectedTag); AsnValueReader collectionReader; // Decode SEQUENCE OF for Certs { collectionReader = sequenceReader.ReadSequence(); var tmpList = new List <EssCertId>(); EssCertId tmpItem; while (collectionReader.HasData) { EssCertId.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, Asn1Tag expectedTag, ReadOnlyMemory <byte> rebind, out PolicyInformation decoded) { decoded = default; AsnValueReader sequenceReader = reader.ReadSequence(expectedTag); AsnValueReader collectionReader; decoded.PolicyIdentifier = sequenceReader.ReadObjectIdentifierAsString(); if (sequenceReader.HasData && sequenceReader.PeekTag().HasSameClassAndValue(Asn1Tag.Sequence)) { // Decode SEQUENCE OF for PolicyQualifiers { collectionReader = sequenceReader.ReadSequence(); var tmpList = new List <PolicyQualifierInfo>(); PolicyQualifierInfo tmpItem; while (collectionReader.HasData) { PolicyQualifierInfo.Decode(ref collectionReader, rebind, out tmpItem); tmpList.Add(tmpItem); } decoded.PolicyQualifiers = tmpList.ToArray(); } } sequenceReader.ThrowIfNotEmpty(); }
internal static void Decode(ref AsnValueReader reader, ReadOnlyMemory <byte> rebind, out PolicyInformation decoded) { Decode(ref reader, Asn1Tag.Sequence, rebind, out decoded); }