diff options
author | Peter Dettman <peter.dettman@gmail.com> | 2022-10-17 17:45:51 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@gmail.com> | 2022-10-17 17:45:51 +0700 |
commit | 1a1a6a635dc952520d6b90f411554b7d44e32954 (patch) | |
tree | f067d3c849fc1e84b40a9364146fb7f231f19906 /crypto/src/cms | |
parent | updated public key encoding to latest version of draft RFC (diff) | |
download | BouncyCastle.NET-ed25519-1a1a6a635dc952520d6b90f411554b7d44e32954.tar.xz |
System.Linq cleanup
Diffstat (limited to 'crypto/src/cms')
-rw-r--r-- | crypto/src/cms/CMSUtils.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/crypto/src/cms/CMSUtils.cs b/crypto/src/cms/CMSUtils.cs index e30ac0491..6800c1d2a 100644 --- a/crypto/src/cms/CMSUtils.cs +++ b/crypto/src/cms/CMSUtils.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Cms; @@ -84,9 +83,10 @@ namespace Org.BouncyCastle.Cms var result = new List<Asn1TaggedObject>(); if (attrCertStore != null) { - result.AddRange( - attrCertStore.EnumerateMatches(null) - .Select(c => new DerTaggedObject(false, 2, c.AttributeCertificate))); + foreach (var attrCert in attrCertStore.EnumerateMatches(null)) + { + result.Add(new DerTaggedObject(false, 2, attrCert.AttributeCertificate)); + } } return result; } @@ -96,9 +96,10 @@ namespace Org.BouncyCastle.Cms var result = new List<X509CertificateStructure>(); if (certStore != null) { - result.AddRange( - certStore.EnumerateMatches(null) - .Select(c => c.CertificateStructure)); + foreach (var cert in certStore.EnumerateMatches(null)) + { + result.Add(cert.CertificateStructure); + } } return result; } @@ -108,9 +109,10 @@ namespace Org.BouncyCastle.Cms var result = new List<CertificateList>(); if (crlStore != null) { - result.AddRange( - crlStore.EnumerateMatches(null) - .Select(c => c.CertificateList)); + foreach (var crl in crlStore.EnumerateMatches(null)) + { + result.Add(crl.CertificateList); + } } return result; } |