diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-06 18:22:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-10-06 18:22:40 +0700 |
commit | f007a46e622f82badab127c5a9870918e0dfd57c (patch) | |
tree | f13dedae636507089619875cc095082c1ce9dd76 /crypto/src | |
parent | Refactoring pass over Pqc.Crypto.Lms (diff) | |
download | BouncyCastle.NET-ed25519-f007a46e622f82badab127c5a9870918e0dfd57c.tar.xz |
Fix exception type
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/pkix/PkixCertPathValidatorResult.cs | 20 |
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; |