diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-20 15:19:15 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-09-20 15:19:15 +0700 |
commit | d438290428230551ff568329478b0e45e5085b44 (patch) | |
tree | 423683961e53d42c709660dc4838d1bfb02f4a07 /crypto/src/x509/X509Certificate.cs | |
parent | Update Asn1.Cmp from bc-java (diff) | |
download | BouncyCastle.NET-ed25519-d438290428230551ff568329478b0e45e5085b44.tar.xz |
Give IStreamCalculator a generic type
Diffstat (limited to 'crypto/src/x509/X509Certificate.cs')
-rw-r--r-- | crypto/src/x509/X509Certificate.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/src/x509/X509Certificate.cs b/crypto/src/x509/X509Certificate.cs index 75efdfbb1..627903e1f 100644 --- a/crypto/src/x509/X509Certificate.cs +++ b/crypto/src/x509/X509Certificate.cs @@ -682,7 +682,7 @@ namespace Org.BouncyCastle.X509 Asn1Encodable parameters = c.SignatureAlgorithm.Parameters; - IStreamCalculator streamCalculator = verifier.CreateCalculator(); + IStreamCalculator<IVerifier> streamCalculator = verifier.CreateCalculator(); byte[] b = this.GetTbsCertificate(); @@ -690,10 +690,8 @@ namespace Org.BouncyCastle.X509 Platform.Dispose(streamCalculator.Stream); - if (!((IVerifier)streamCalculator.GetResult()).IsVerified(this.GetSignature())) - { + if (!streamCalculator.GetResult().IsVerified(this.GetSignature())) throw new InvalidKeyException("Public key presented not for certificate signature"); - } } private CachedEncoding GetCachedEncoding() |