diff options
Diffstat (limited to 'crypto/src/cms/CMSSignedDataStreamGenerator.cs')
-rw-r--r-- | crypto/src/cms/CMSSignedDataStreamGenerator.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/crypto/src/cms/CMSSignedDataStreamGenerator.cs b/crypto/src/cms/CMSSignedDataStreamGenerator.cs index 746538ebd..36e7a780c 100644 --- a/crypto/src/cms/CMSSignedDataStreamGenerator.cs +++ b/crypto/src/cms/CMSSignedDataStreamGenerator.cs @@ -809,8 +809,25 @@ namespace Org.BouncyCastle.Cms _out.Write(bytes, off, len); } +#if PORTABLE + protected override void Disposing(bool disposing) + { + if (disposing) + { + DoClose(); + } + base.Dispose(disposing); + } +#else public override void Close() { + DoClose(); + base.Close(); + } +#endif + + private void DoClose() + { Platform.Dispose(_out); // TODO Parent context(s) should really be be closed explicitly @@ -898,8 +915,7 @@ namespace Org.BouncyCastle.Cms _sigGen.Close(); _sGen.Close(); - base.Close(); - } + } private static void WriteToGenerator( Asn1Generator ag, |