summary refs log tree commit diff
path: root/crypto/src/asn1/x509/KeyUsage.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-01-27 12:51:18 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-01-27 12:51:18 +0700
commit0c21bca32d3ac397ada9be1f0482540f7247f7cf (patch)
tree6053bb9606d6e8c2047a2cdd766c658dad19ec11 /crypto/src/asn1/x509/KeyUsage.cs
parentMisc. cleanup after bc-fips-csharp updates (diff)
downloadBouncyCastle.NET-ed25519-0c21bca32d3ac397ada9be1f0482540f7247f7cf.tar.xz
MIsc. cleanup
Diffstat (limited to 'crypto/src/asn1/x509/KeyUsage.cs')
-rw-r--r--crypto/src/asn1/x509/KeyUsage.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/asn1/x509/KeyUsage.cs b/crypto/src/asn1/x509/KeyUsage.cs
index b31b54341..dd69cc63b 100644
--- a/crypto/src/asn1/x509/KeyUsage.cs
+++ b/crypto/src/asn1/x509/KeyUsage.cs
@@ -32,10 +32,10 @@ namespace Org.BouncyCastle.Asn1.X509
 
 		public static new KeyUsage GetInstance(object obj)
 		{
-			if (obj is KeyUsage)
-				return (KeyUsage)obj;
-            if (obj is X509Extension)
-				return GetInstance(X509Extension.ConvertValueToObject((X509Extension)obj));
+			if (obj is KeyUsage keyUsage)
+				return keyUsage;
+            if (obj is X509Extension x509Extension)
+				return GetInstance(X509Extension.ConvertValueToObject(x509Extension));
             if (obj == null)
                 return null;
 			return new KeyUsage(DerBitString.GetInstance(obj));