summary refs log tree commit diff
path: root/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pkix/PkixCertPathValidatorUtilities.cs')
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorUtilities.cs25
1 files changed, 11 insertions, 14 deletions
diff --git a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
index 8d615b488..32b00503e 100644
--- a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
@@ -210,20 +210,17 @@ namespace Org.BouncyCastle.Pkix
 			return cert.SubjectDN.Equivalent(cert.IssuerDN, true);
 		}
 
-		internal static AlgorithmIdentifier GetAlgorithmIdentifier(
-			AsymmetricKeyParameter key)
-		{
-			try
-			{
-				SubjectPublicKeyInfo info = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(key);
-
-				return info.AlgorithmID;
-			}
-			catch (Exception e)
-			{
-				throw new PkixCertPathValidatorException("Subject public key cannot be decoded.", e);
-			}
-		}
+        internal static AlgorithmIdentifier GetAlgorithmIdentifier(AsymmetricKeyParameter key)
+        {
+            try
+            {
+                return SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(key).Algorithm;
+            }
+            catch (Exception e)
+            {
+                throw new PkixCertPathValidatorException("Subject public key cannot be decoded.", e);
+            }
+        }
 
 		internal static bool IsAnyPolicy(ISet<string> policySet)
 		{