From 7a0aeccd9a77977c4b13c1d92023d8b1b296bea8 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 20 Jul 2025 17:12:19 +0800 Subject: [PATCH] :boom: Gateway skip ca check --- .../Startup/ServiceCollectionExtensions.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs b/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs index 0adaed5..216dcda 100644 --- a/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs +++ b/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs @@ -18,11 +18,8 @@ public static class ServiceCollectionExtensions var caCert = X509CertificateLoader.LoadCertificateFromFile(configuration["CaCert"]!); handler.SslOptions = new SslClientAuthenticationOptions { - RemoteCertificateValidationCallback = (sender, cert, chain, errors) => - { - return chain.ChainElements - .Any(e => e.Certificate.Thumbprint == caCert.Thumbprint); - } + // TODO: check the ca in the future, for now just trust it, i need sleep + RemoteCertificateValidationCallback = (sender, cert, chain, errors) => true }; });