summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-10-06 18:22:40 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-10-06 18:22:40 +0700
commitf007a46e622f82badab127c5a9870918e0dfd57c (patch)
treef13dedae636507089619875cc095082c1ce9dd76 /crypto
parentRefactoring pass over Pqc.Crypto.Lms (diff)
downloadBouncyCastle.NET-ed25519-f007a46e622f82badab127c5a9870918e0dfd57c.tar.xz
Fix exception type
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/pkix/PkixCertPathValidatorResult.cs20
1 files changed, 7 insertions, 13 deletions
diff --git a/crypto/src/pkix/PkixCertPathValidatorResult.cs b/crypto/src/pkix/PkixCertPathValidatorResult.cs
index 693ded89c..07cb350c1 100644
--- a/crypto/src/pkix/PkixCertPathValidatorResult.cs
+++ b/crypto/src/pkix/PkixCertPathValidatorResult.cs
@@ -31,20 +31,14 @@ namespace Org.BouncyCastle.Pkix
 			get { return this.subjectPublicKey; }
 		}
 
-		public PkixCertPathValidatorResult(
-			TrustAnchor				trustAnchor,
-			PkixPolicyNode			policyTree,
-			AsymmetricKeyParameter	subjectPublicKey)
+		public PkixCertPathValidatorResult(TrustAnchor trustAnchor, PkixPolicyNode policyTree,
+			AsymmetricKeyParameter subjectPublicKey)
 		{
-			if (subjectPublicKey == null)
-			{
-				throw new NullReferenceException("subjectPublicKey must be non-null");
-			}
-			if (trustAnchor == null)
-			{
-				throw new NullReferenceException("trustAnchor must be non-null");
-			}
-			
+            if (trustAnchor == null)
+                throw new ArgumentNullException(nameof(trustAnchor));
+            if (subjectPublicKey == null)
+				throw new ArgumentNullException(nameof(subjectPublicKey));
+
 			this.trustAnchor = trustAnchor;
 			this.policyTree = policyTree;
 			this.subjectPublicKey = subjectPublicKey;