Closed mbwilding closed 2 years ago
Tested and working, using this change in production inside an AWS Lambda .NET 6 (ARM64) with and without a docker container.
Hi! Thanks for this PR. Sorry, I didn't have much time for this project recently, but I'm trying to make time for it at least once in a month. Bypassing SSL check was already possible with overriding internal HttpClient:
var handler = new HttpClientHandler
{
SslProtocols = SslProtocols.Tls12,
CheckCertificateRevocationList = true,
ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => true // i.e. bypass cert validation
};
var httpClient = new HttpClient(handler);
var authInfo = new AuthInfo("user", "password", "xyz", "region");
var urlInfo = new UrlInfo() { Host = "hostname" };
var snowflakeClient = new SnowflakeClient(authInfo, null, urlInfo);
snowflakeClient.SetHttpClient(httpClient); // override internal http client
However dedicated configuration option might be more convenient - I'll think about this. As for this PR - it does have too many changes at once. I like most code style fixes, but in some rare cases I think they do hurt readability (and sometimes IDE suggests just bad changes). So I have reviewed all solution for IDE fix suggestions and applied most of them in my own commit.
Added the ability to do the SSL Cert bypass via constructor Fixed spelling mistakes and adjusted things to match the C# naming conventions Updated to use object initializers.