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;
}
diff --git a/crypto/src/pkix/PkixCertPath.cs b/crypto/src/pkix/PkixCertPath.cs
index 54a3c8f6a..95280173a 100644
--- a/crypto/src/pkix/PkixCertPath.cs
+++ b/crypto/src/pkix/PkixCertPath.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.X509;
diff --git a/crypto/src/pqc/crypto/crystals/dilithium/PolyVecL.cs b/crypto/src/pqc/crypto/crystals/dilithium/PolyVecL.cs
index 75309b374..58c286768 100644
--- a/crypto/src/pqc/crypto/crystals/dilithium/PolyVecL.cs
+++ b/crypto/src/pqc/crypto/crystals/dilithium/PolyVecL.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium
+namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium
{
internal class PolyVecL
{
diff --git a/crypto/src/pqc/crypto/crystals/dilithium/PolyVecMatrix.cs b/crypto/src/pqc/crypto/crystals/dilithium/PolyVecMatrix.cs
index cb41889b9..fa1af0560 100644
--- a/crypto/src/pqc/crypto/crystals/dilithium/PolyVecMatrix.cs
+++ b/crypto/src/pqc/crypto/crystals/dilithium/PolyVecMatrix.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium
+namespace Org.BouncyCastle.Pqc.Crypto.Crystals.Dilithium
{
internal class PolyVecMatrix
{
diff --git a/crypto/src/pqc/crypto/falcon/FalconSmallPrimes.cs b/crypto/src/pqc/crypto/falcon/FalconSmallPrimes.cs
index dcefa7f05..8e11990bc 100644
--- a/crypto/src/pqc/crypto/falcon/FalconSmallPrimes.cs
+++ b/crypto/src/pqc/crypto/falcon/FalconSmallPrimes.cs
@@ -1,8 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
namespace Org.BouncyCastle.Pqc.Crypto.Falcon
{
class FalconSmallPrimes
|