in net/JetBrains.SignatureVerifier/src/Crypt/BC/CMSSignedHelper.cs [228:268]
internal IStore<X509V2AttributeCertificate> CreateAttributeStore(
Asn1Set certSet)
{
IList<X509V2AttributeCertificate> certs = new List<X509V2AttributeCertificate>();
if (certSet != null)
{
foreach (Asn1Encodable ae in certSet)
{
try
{
Asn1Object obj = ae.ToAsn1Object();
if (obj is Asn1TaggedObject)
{
Asn1TaggedObject tagged = (Asn1TaggedObject)obj;
if (tagged.TagNo == 2)
{
certs.Add(
new X509V2AttributeCertificate(
Asn1Sequence.GetInstance(tagged, false).GetEncoded()));
}
}
}
catch (Exception ex)
{
throw new CmsException("can't re-encode attribute certificate!", ex);
}
}
}
try
{
return CollectionUtilities.CreateStore(certs);
}
catch (ArgumentException e)
{
throw new CmsException("can't setup the X509Store", e);
}
}