Skip to content

Commit

Permalink
Merge pull request #251 from mattosaurus/bug/250-output-stream-disposal
Browse files Browse the repository at this point in the history
Don't dispose compressed ouitput stream
  • Loading branch information
mattosaurus authored Nov 13, 2023
2 parents 9225aa8 + 37828c9 commit 8535de9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
analyze:
runs-on: windows-latest
steps:
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 11
Expand Down
11 changes: 5 additions & 6 deletions PgpCore/PGP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5010,13 +5010,12 @@ private async Task OutputSignedAsync(FileInfo inputFile, Stream outputStream)
private async Task OutputSignedAsync(Stream inputStream, Stream outputStream,
string name)
{
using (Stream compressedOut = ChainCompressedOut(outputStream))
Stream compressedOut = ChainCompressedOut(outputStream);

PgpSignatureGenerator signatureGenerator = InitSignatureGenerator(compressedOut);
using (Stream literalOut = ChainLiteralStreamOut(compressedOut, inputStream, name))
{
PgpSignatureGenerator signatureGenerator = InitSignatureGenerator(compressedOut);
using (Stream literalOut = ChainLiteralStreamOut(compressedOut, inputStream, name))
{
await WriteOutputAndSignAsync(compressedOut, literalOut, inputStream, signatureGenerator);
}
await WriteOutputAndSignAsync(compressedOut, literalOut, inputStream, signatureGenerator);
}
}

Expand Down
6 changes: 3 additions & 3 deletions PgpCore/PgpCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<PackageProjectUrl>https://github.com/mattosaurus/PgpCore</PackageProjectUrl>
<RepositoryUrl>https://github.com/mattosaurus/PgpCore</RepositoryUrl>
<PackageTags>PGP .NET Core</PackageTags>
<Version>5.13.0.0</Version>
<Version>5.13.1.0</Version>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<FileVersion>5.13.0</FileVersion>
<PackageReleaseNotes>v5.13.0 - Add prefered encryption key</PackageReleaseNotes>
<FileVersion>5.13.1</FileVersion>
<PackageReleaseNotes>v5.13.1 - Don't dispose compressed output stream</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
Expand Down

0 comments on commit 8535de9

Please sign in to comment.