summary refs log tree commit diff
path: root/crypto/src/asn1/crmf/PopoSigningKeyInput.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/crmf/PopoSigningKeyInput.cs')
-rw-r--r--crypto/src/asn1/crmf/PopoSigningKeyInput.cs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crypto/src/asn1/crmf/PopoSigningKeyInput.cs b/crypto/src/asn1/crmf/PopoSigningKeyInput.cs
index 30d017475..f2517aa57 100644
--- a/crypto/src/asn1/crmf/PopoSigningKeyInput.cs
+++ b/crypto/src/asn1/crmf/PopoSigningKeyInput.cs
@@ -16,13 +16,11 @@ namespace Org.BouncyCastle.Asn1.Crmf
         {
             Asn1Encodable authInfo = (Asn1Encodable)seq[0];
 
-            if (authInfo is Asn1TaggedObject)
+            if (authInfo is Asn1TaggedObject tagObj)
             {
-                Asn1TaggedObject tagObj = (Asn1TaggedObject)authInfo;
                 if (tagObj.TagNo != 0)
-                {
-                    throw new ArgumentException("Unknown authInfo tag: " + tagObj.TagNo, "seq");
-                }
+                    throw new ArgumentException("Unknown authInfo tag: " + tagObj.TagNo, nameof(seq));
+
                 sender = GeneralName.GetInstance(tagObj.GetObject());
             }
             else