summary refs log tree commit diff
path: root/crypto/src/tsp/TimeStampTokenGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crypto/src/tsp/TimeStampTokenGenerator.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/tsp/TimeStampTokenGenerator.cs b/crypto/src/tsp/TimeStampTokenGenerator.cs
index 4783c8772..55142a5e9 100644
--- a/crypto/src/tsp/TimeStampTokenGenerator.cs
+++ b/crypto/src/tsp/TimeStampTokenGenerator.cs
@@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Tsp
                 byte[] certEnc = assocCert.GetEncoded();
                 stream.Write(certEnc, 0, certEnc.Length);
                 stream.Flush();
-                stream.Close();
+                Platform.Dispose(stream);
 
                 if (((AlgorithmIdentifier)digestCalculator.AlgorithmDetails).Algorithm.Equals(OiwObjectIdentifiers.IdSha1))
                 {