diff options
Diffstat (limited to 'crypto/src/pkcs')
-rw-r--r-- | crypto/src/pkcs/Pkcs10CertificationRequest.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/pkcs/Pkcs10CertificationRequest.cs b/crypto/src/pkcs/Pkcs10CertificationRequest.cs index be4cbb570..59b5b51ed 100644 --- a/crypto/src/pkcs/Pkcs10CertificationRequest.cs +++ b/crypto/src/pkcs/Pkcs10CertificationRequest.cs @@ -281,14 +281,14 @@ namespace Org.BouncyCastle.Pkcs this.reqInfo = new CertificationRequestInfo(subject, pubInfo, attributes); - IStreamCalculator streamCalculator = signatureFactory.CreateCalculator(); + IStreamCalculator<IBlockResult> streamCalculator = signatureFactory.CreateCalculator(); using (Stream sigStream = streamCalculator.Stream) { reqInfo.EncodeTo(sigStream, Der); } // Generate Signature. - sigBits = new DerBitString(((IBlockResult)streamCalculator.GetResult()).Collect()); + sigBits = new DerBitString(streamCalculator.GetResult().Collect()); } // internal Pkcs10CertificationRequest( @@ -344,13 +344,13 @@ namespace Org.BouncyCastle.Pkcs { byte[] b = reqInfo.GetDerEncoded(); - IStreamCalculator streamCalculator = verifier.CreateCalculator(); + IStreamCalculator<IVerifier> streamCalculator = verifier.CreateCalculator(); streamCalculator.Stream.Write(b, 0, b.Length); Platform.Dispose(streamCalculator.Stream); - return ((IVerifier)streamCalculator.GetResult()).IsVerified(sigBits.GetOctets()); + return streamCalculator.GetResult().IsVerified(sigBits.GetOctets()); } catch (Exception e) { |