Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -569,12 +569,18 @@ private static bool AndroidGetSslProtocolSupport(SslProtocols protocol)
#pragma warning disable SYSLIB0039 // TLS versions 1.0 and 1.1 have known vulnerabilities
private static bool GetTls10Support()
{
// on macOS and Android TLS 1.0 is supported.
if ((IsApplePlatform && !IsNetworkFrameworkEnabled()) || IsAndroid)
// on macOS TLS 1.0 is supported.
if (IsApplePlatform && !IsNetworkFrameworkEnabled())
{
return true;
}

// on Android TLS 1.0 support depends on API level
if (IsAndroid)
{
return AndroidGetSslProtocolSupport(SslProtocols.Tls);
}

// Windows depend on registry, enabled by default on all supported versions.
if (IsWindows)
{
Expand All @@ -597,11 +603,16 @@ private static bool GetTls11Support()
// It is enabled on other versions unless explicitly disabled.
return GetProtocolSupportFromWindowsRegistry(SslProtocols.Tls11, defaultProtocolSupport: true) && !IsWindows10Version20348OrGreater;
}
// on macOS and Android TLS 1.1 is supported.
else if ((IsApplePlatform && !IsNetworkFrameworkEnabled()) || IsAndroid)
// on macOS TLS 1.1 is supported.
else if (IsApplePlatform && !IsNetworkFrameworkEnabled())
{
return true;
}
// on Android TLS 1.1 support depends on API level
else if (IsAndroid)
{
return AndroidGetSslProtocolSupport(SslProtocols.Tls11);
}

return IsOpenSslSupported && OpenSslGetTlsSupport(SslProtocols.Tls11);
}
Expand Down