Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/RemoteContainers.Aspire/Docker/DockerMessageHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// limitations under the License.
// </copyright>

using System.Net.Security;
using System.Security.Cryptography.X509Certificates;

namespace Hj.RemoteContainers.Aspire.Docker;
Expand All @@ -34,9 +35,9 @@ public HttpMessageHandler Init()
if (_dockerCertificate.TryGetCertificate(out _caCert, out _clientCert))
{
ClientCertificates.Add(_clientCert);
ServerCertificateCustomValidationCallback = (_, serverCert, chain, _) =>
ServerCertificateCustomValidationCallback = (_, serverCert, chain, sslPolicyErrors) =>
{
if (serverCert is null || chain is null)
if (serverCert is null || chain is null || (sslPolicyErrors & ~SslPolicyErrors.RemoteCertificateChainErrors) != SslPolicyErrors.None)
{
return false;
Comment thread
henrikhimself marked this conversation as resolved.
}
Expand Down
Loading