Skip to content

Commit a8e2c3e

Browse files
authored
Disable custom TLS verification for MacOS
1 parent 9c13dce commit a8e2c3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Tinify/Client.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ internal sealed class ErrorData
3333

3434
public Client(string key, string appIdentifier = null, string proxy = null)
3535
{
36-
var handler = new HttpClientHandler()
36+
var handler = new HttpClientHandler();
37+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
3738
{
39+
// TLS is extremely spotty and differs per version on MacOS
3840
ServerCertificateCustomValidationCallback = Internal.SSL.ValidationCallback
3941
};
4042

0 commit comments

Comments
 (0)