Description
In PR #1311 (issue #585) two writable streams (Certificate.cs and XmlDigitalSignatureProcessor.cs) get wrapped in a memory stream by calling the new method GetSeekableStream(FileMode.Create, FileAccess.Write)
. It is unclear from the PR source how the written data will be propagated to the actual zip stream. Since this was noticed after the PR merged I'm opening a separate issue to revisit the handling of writable streams.
I'd also argue that the current implementation of GetSeekableStream should not have had FileMode
and FileAccess
paramters, since the only case which is handled correctly is the open/read combination.
I'd suggest either providing a dedicated stream wrapper class and keeping FileMode/FileAccess, or remove FileMode/FileAccess and provide a separate code path for callers who want to write data.
Related: issue #1363 apparently still has call sites which do not get wrapped