diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-26 20:47:24 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-26 20:47:24 +0700 |
commit | eed964522f8e198a33267387942b1764018dfe1e (patch) | |
tree | c6bcead7e5e54c88845287d10bca6a1235e655e8 /crypto/src/cms/OriginatorInfoGenerator.cs | |
parent | Cleanup in PQC code (diff) | |
download | BouncyCastle.NET-ed25519-eed964522f8e198a33267387942b1764018dfe1e.tar.xz |
Replace IX509Store API with new store/selector API
- overhaul Cms, Pkix, X509 APIs
Diffstat (limited to 'crypto/src/cms/OriginatorInfoGenerator.cs')
-rw-r--r-- | crypto/src/cms/OriginatorInfoGenerator.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/src/cms/OriginatorInfoGenerator.cs b/crypto/src/cms/OriginatorInfoGenerator.cs index 6bf108799..d7d24dcc4 100644 --- a/crypto/src/cms/OriginatorInfoGenerator.cs +++ b/crypto/src/cms/OriginatorInfoGenerator.cs @@ -1,37 +1,37 @@ using System; -using System.Collections; +using System.Collections.Generic; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Cms; -using Org.BouncyCastle.Utilities; +using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Utilities.Collections; using Org.BouncyCastle.X509; -using Org.BouncyCastle.X509.Store; namespace Org.BouncyCastle.Cms { public class OriginatorInfoGenerator { - private readonly IList origCerts; - private readonly IList origCrls; + private readonly List<X509CertificateStructure> origCerts; + private readonly List<CertificateList> origCrls; public OriginatorInfoGenerator(X509Certificate origCert) { - this.origCerts = Platform.CreateArrayList(1); + this.origCerts = new List<X509CertificateStructure>(); this.origCrls = null; origCerts.Add(origCert.CertificateStructure); } - public OriginatorInfoGenerator(IX509Store origCerts) + public OriginatorInfoGenerator(IStore<X509Certificate> origCerts) : this(origCerts, null) { } - public OriginatorInfoGenerator(IX509Store origCerts, IX509Store origCrls) + public OriginatorInfoGenerator(IStore<X509Certificate> origCerts, IStore<X509Crl> origCrls) { this.origCerts = CmsUtilities.GetCertificatesFromStore(origCerts); this.origCrls = origCrls == null ? null : CmsUtilities.GetCrlsFromStore(origCrls); } - + public virtual OriginatorInfo Generate() { Asn1Set certSet = CmsUtilities.CreateDerSetFromList(origCerts); |