✨ Grpc now ignore the CA as well
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user