From 5f2a38957f777e32ce79089de093760abe8089cd Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 24 May 2021 01:07:22 +0700 Subject: Use portable Stream close --- crypto/src/tsp/TimeStampTokenGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/src') 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)) { -- cgit 1.4.1