summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-02-07 14:13:28 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-02-07 14:13:28 +0700
commitb2beb29f72e78c626b004251ef84ab5bbb847f0f (patch)
treedc6b1106395c7e4af9be243717f514190ae6ad5c
parentAdd direct PKMacValue constructor (diff)
downloadBouncyCastle.NET-ed25519-b2beb29f72e78c626b004251ef84ab5bbb847f0f.tar.xz
Null check
-rw-r--r--crypto/src/asn1/Asn1Utilities.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/src/asn1/Asn1Utilities.cs b/crypto/src/asn1/Asn1Utilities.cs
index ae395e4ef..6706ace72 100644
--- a/crypto/src/asn1/Asn1Utilities.cs
+++ b/crypto/src/asn1/Asn1Utilities.cs
@@ -66,6 +66,8 @@ namespace Org.BouncyCastle.Asn1
 
                 throw new ArgumentException(message, nameof(declaredExplicit));
             }
+            if (taggedObject == null)
+                throw new ArgumentNullException(nameof(taggedObject));
 
             return constructor(taggedObject.GetExplicitBaseObject());
         }