Ignore 0-byte responses from AIA fetch.
authorKevin Jones <kevin@vcsjones.com>
Mon, 6 Jul 2020 16:49:14 +0000 (12:49 -0400)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2020 16:49:14 +0000 (09:49 -0700)
commitac8fe0d787ece0ad0cc4db767393d55361924623
tree8f0c025298070949cc21ea8a55406b38b3b937a8
parentc8a994222d8b6cb4202a85570ee860e4b34a89e9
Ignore 0-byte responses from AIA fetch.

When fetching a certificate with AIA, we should ignore responses that
are zero bytes in length. A zero-byte value passed to X509Certificate2
will create a default certificate with a null PAL. This was being
passed in to the OpenSSL chain builder, and would pass in a null handle
for the certificate.
src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/RevocationResponder.cs
src/libraries/System.Security.Cryptography.X509Certificates/src/Internal/Cryptography/Pal.Unix/CertificateAssetDownloader.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/RevocationTests/AiaTests.cs