summary refs log tree commit diff
path: root/crypto/src/x509/X509Certificate.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-09-20 15:19:15 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-09-20 15:19:15 +0700
commitd438290428230551ff568329478b0e45e5085b44 (patch)
tree423683961e53d42c709660dc4838d1bfb02f4a07 /crypto/src/x509/X509Certificate.cs
parentUpdate Asn1.Cmp from bc-java (diff)
downloadBouncyCastle.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.cs6
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()