summary refs log tree commit diff
path: root/crypto/src/crmf
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-28 12:55:26 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-28 12:55:26 +0700
commit0f951361cae9243b8d1a77d8f4333a602197d50d (patch)
treec5f2adc22a0b8ef42d5964df49268b73b3371a30 /crypto/src/crmf
parentGenerics migration in Cms (diff)
downloadBouncyCastle.NET-ed25519-0f951361cae9243b8d1a77d8f4333a602197d50d.tar.xz
Generics migration in Crmf, Crypto, Math
Diffstat (limited to 'crypto/src/crmf')
-rw-r--r--crypto/src/crmf/CertificateRequestMessageBuilder.cs13
-rw-r--r--crypto/src/crmf/EncryptedValueBuilder.cs4
2 files changed, 5 insertions, 12 deletions
diff --git a/crypto/src/crmf/CertificateRequestMessageBuilder.cs b/crypto/src/crmf/CertificateRequestMessageBuilder.cs
index 88d1d87bd..9a33fd964 100644
--- a/crypto/src/crmf/CertificateRequestMessageBuilder.cs
+++ b/crypto/src/crmf/CertificateRequestMessageBuilder.cs
@@ -1,13 +1,11 @@
 using System;
-using System.Collections;
+using System.Collections.Generic;
 
 using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.Crmf;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Crypto;
-using Org.BouncyCastle.Crypto.Operators;
 using Org.BouncyCastle.Math;
-using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Crmf
 {
@@ -16,7 +14,7 @@ namespace Org.BouncyCastle.Crmf
         private readonly BigInteger _certReqId;
         private X509ExtensionsGenerator _extGenerator;
         private CertTemplateBuilder _templateBuilder;
-        private IList _controls = Platform.CreateArrayList();
+        private IList<IControl> m_controls = new List<IControl>();
         private ISignatureFactory _popSigner;
         private PKMacBuilder _pkMacBuilder;
         private char[] _password;
@@ -95,7 +93,7 @@ namespace Org.BouncyCastle.Crmf
 
         public CertificateRequestMessageBuilder AddControl(IControl control)
         {
-            _controls.Add(control);
+            m_controls.Add(control);
             return this;
         }
 
@@ -195,13 +193,12 @@ namespace Org.BouncyCastle.Crmf
 
             v.Add(_templateBuilder.Build());
 
-            if (_controls.Count > 0)
+            if (m_controls.Count > 0)
             {
                 Asn1EncodableVector controlV = new Asn1EncodableVector();
 
-                foreach (object item in _controls)
+                foreach (var control in m_controls)
                 {
-                    IControl control = (IControl)item;
                     controlV.Add(new AttributeTypeAndValue(control.Type, control.Value));
                 }
 
diff --git a/crypto/src/crmf/EncryptedValueBuilder.cs b/crypto/src/crmf/EncryptedValueBuilder.cs
index d95896959..0154be58c 100644
--- a/crypto/src/crmf/EncryptedValueBuilder.cs
+++ b/crypto/src/crmf/EncryptedValueBuilder.cs
@@ -1,15 +1,11 @@
 using System;
-using System.Collections;
 using System.IO;
-using System.Text;
 
 using Org.BouncyCastle.Asn1;
 using Org.BouncyCastle.Asn1.Crmf;
-using Org.BouncyCastle.Asn1.Nist;
 using Org.BouncyCastle.Asn1.Pkcs;
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Crypto;
-using Org.BouncyCastle.Crypto.Engines;
 using Org.BouncyCastle.Crypto.Parameters;
 using Org.BouncyCastle.Pkcs;
 using Org.BouncyCastle.Utilities;