summary refs log tree commit diff
path: root/crypto/src/pkix
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-07-12 19:37:04 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-07-12 19:37:04 +0700
commite9f7e61e5598c312ce7f74a5b5362e6fa600b100 (patch)
tree40ece3a7dbe9680788a8e0fd115a5ed436dd32f7 /crypto/src/pkix
parentGenerate random bytes in place (diff)
downloadBouncyCastle.NET-ed25519-e9f7e61e5598c312ce7f74a5b5362e6fa600b100.tar.xz
Remove redundant utility methods and refactor
Diffstat (limited to 'crypto/src/pkix')
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorUtilities.cs18
1 files changed, 2 insertions, 16 deletions
diff --git a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
index fccd0b3c5..2514f1df2 100644
--- a/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorUtilities.cs
@@ -1042,23 +1042,9 @@ namespace Org.BouncyCastle.Pkix
 			return certs;
 		}
 
-		/// <summary>
-		/// Extract the value of the given extension, if it exists.
-		/// </summary>
-		/// <param name="ext">The extension object.</param>
-		/// <param name="oid">The object identifier to obtain.</param>
-		/// <returns>Asn1Object</returns>
-		/// <exception cref="Exception">if the extension cannot be read.</exception>
-		internal static Asn1Object GetExtensionValue(
-			IX509Extension		ext,
-			DerObjectIdentifier	oid)
+		internal static Asn1Object GetExtensionValue(IX509Extension extensions, DerObjectIdentifier oid)
 		{
-			Asn1OctetString bytes = ext.GetExtensionValue(oid);
-
-			if (bytes == null)
-				return null;
-
-			return X509ExtensionUtilities.FromExtensionValue(bytes);
+			return X509ExtensionUtilities.FromExtensionValue(extensions, oid);
 		}
 	}
 }