From c5d6519a73201f74c30a1dd283afa3f2da9dc78b Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 9 Jun 2021 21:47:45 +0700 Subject: Respect buffer size and use Streams --- crypto/src/cms/CMSProcessableFile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/src') diff --git a/crypto/src/cms/CMSProcessableFile.cs b/crypto/src/cms/CMSProcessableFile.cs index c74d2a846..486df1960 100644 --- a/crypto/src/cms/CMSProcessableFile.cs +++ b/crypto/src/cms/CMSProcessableFile.cs @@ -36,8 +36,8 @@ namespace Org.BouncyCastle.Cms public virtual void Write(Stream zOut) { - Stream inStr = GetInputStream(); - Streams.PipeAll(inStr, zOut); + Stream inStr = _file.OpenRead(); + Streams.PipeAll(inStr, zOut, _bufSize); Platform.Dispose(inStr); } -- cgit 1.4.1