summary refs log tree commit diff
path: root/crypto/src/pkix
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 22:02:57 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-27 22:02:57 +0700
commit7937784671130cb17e58066ab743d6b46931c475 (patch)
tree8143df7b0da7a4ef6c00ef1db04b84fbd14189ec /crypto/src/pkix
parentGenerics migration in Asn1 (diff)
downloadBouncyCastle.NET-ed25519-7937784671130cb17e58066ab743d6b46931c475.tar.xz
Update alternative names from bc-java
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorUtilities.cs8
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
index a1e37f09d..80ae2f83d 100644
--- a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 
@@ -160,7 +159,7 @@ namespace Org.BouncyCastle.Pkix
 			var issuerAltNames = cert.GetIssuerAlternativeNames();
 			if (issuerAltNames != null)
 			{
-				foreach (IList list in issuerAltNames)
+				foreach (var list in issuerAltNames)
 				{
 					// look for URI
 					if (list.Count >= 2 && list[0].Equals(GeneralName.UniformResourceIdentifier))
@@ -721,10 +720,7 @@ namespace Org.BouncyCastle.Pkix
 				}
 
 				// add and check issuer principals
-				for (IEnumerator it = issuerPrincipals.GetEnumerator(); it.MoveNext(); )
-				{
-					issuers.Add((X509Name)it.Current);
-				}
+				issuers.AddRange(issuerPrincipals);
 			}
 			// TODO: is not found although this should correctly add the rel name. selector of Sun is buggy here or PKI test case is invalid
 			// distributionPoint