From ee3197f210975da636dcd18cbf1349e6616e7de0 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 20 Jul 2025 18:11:22 +0800 Subject: [PATCH] :sparkles: Grpc now ignore the CA as well --- DysonNetwork.Shared/Proto/GrpcClientHelper.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DysonNetwork.Shared/Proto/GrpcClientHelper.cs b/DysonNetwork.Shared/Proto/GrpcClientHelper.cs index a865319..2ca966a 100644 --- a/DysonNetwork.Shared/Proto/GrpcClientHelper.cs +++ b/DysonNetwork.Shared/Proto/GrpcClientHelper.cs @@ -21,6 +21,8 @@ public static class GrpcClientHelper ? X509Certificate2.CreateFromPemFile(clientCertPath, clientKeyPath) : X509Certificate2.CreateFromEncryptedPemFile(clientCertPath, clientCertPassword, clientKeyPath) ); + // TODO: Verify the ca in the future + handler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true; var httpClient = new HttpClient(handler); httpClient.DefaultRequestVersion = HttpVersion.Version20; httpClient.DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher;