From 4f0b4d8b60c74775b29e1ecd448b81b60b0a1935 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 2 Jan 2018 14:55:10 -0500 Subject: [PATCH] Fixed OpenPgpContext.RetrievePublicKeyRingAsync() to use the filtered stream Not all cases used the filtered stream previously. --- MimeKit/Cryptography/OpenPgpContext.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MimeKit/Cryptography/OpenPgpContext.cs b/MimeKit/Cryptography/OpenPgpContext.cs index 2599e0ec59..da791a3c69 100644 --- a/MimeKit/Cryptography/OpenPgpContext.cs +++ b/MimeKit/Cryptography/OpenPgpContext.cs @@ -535,7 +535,7 @@ async Task RetrievePublicKeyRingAsync (long keyId, bool doAsyn if (doAsync) { using (var response = await client.GetAsync (uri.ToString (), cancellationToken)) - await response.Content.CopyToAsync (stream); + await response.Content.CopyToAsync (filtered); } else { #if !NETSTANDARD && !PORTABLE var request = (HttpWebRequest) WebRequest.Create (uri.ToString ()); @@ -545,7 +545,7 @@ async Task RetrievePublicKeyRingAsync (long keyId, bool doAsyn } #else using (var response = client.GetAsync (uri.ToString (), cancellationToken).GetAwaiter ().GetResult ()) - response.Content.CopyToAsync (stream).GetAwaiter ().GetResult (); + response.Content.CopyToAsync (filtered).GetAwaiter ().GetResult (); #endif }