summary refs log tree commit diff
path: root/crypto/src/x509/X509V1CertificateGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/x509/X509V1CertificateGenerator.cs')
-rw-r--r--crypto/src/x509/X509V1CertificateGenerator.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/src/x509/X509V1CertificateGenerator.cs b/crypto/src/x509/X509V1CertificateGenerator.cs
index 0ab6f4b77..a452df440 100644
--- a/crypto/src/x509/X509V1CertificateGenerator.cs
+++ b/crypto/src/x509/X509V1CertificateGenerator.cs
@@ -178,15 +178,15 @@ namespace Org.BouncyCastle.X509
 
 			TbsCertificateStructure tbsCert = tbsGen.GenerateTbsCertificate();
 
-			Stream sigStream = signatureCalculator.GetSignatureUpdater ();
+            IStreamCalculator streamCalculator = signatureCalculator.CreateCalculator();
 
-			byte[] encoded = tbsCert.GetDerEncoded();
+            byte[] encoded = tbsCert.GetDerEncoded();
 
-			sigStream.Write (encoded, 0, encoded.Length);
+            streamCalculator.Stream.Write(encoded, 0, encoded.Length);
 
-			sigStream.Close ();
+            streamCalculator.Stream.Close();
 
-			return GenerateJcaObject(tbsCert, (AlgorithmIdentifier)signatureCalculator.AlgorithmDetails, signatureCalculator.Signature());
+            return GenerateJcaObject(tbsCert, (AlgorithmIdentifier)signatureCalculator.AlgorithmDetails, ((IBlockResult)streamCalculator.GetResult()).DoFinal());
 		}
 
 		private X509Certificate GenerateJcaObject(