Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.
Merged

beta #763

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
27 changes: 26 additions & 1 deletion src/Titanium.Web.Proxy/Network/Tcp/TcpConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,32 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
stream?.Dispose();
tcpServerSocket?.Close();

enabledSslProtocols = SslProtocols.Tls;
// Specifying Tls11 and/or Tls12 will disable the usage of Ssl3, even if it has been included.
// https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.tcptransportsecurity.sslprotocols?view=dotnet-plat-ext-3.1
enabledSslProtocols = proxyServer.SupportedSslProtocols & (SslProtocols)0xff;

if (enabledSslProtocols == SslProtocols.None)
{
throw;
}

retry = false;
goto retry;
}
catch (AuthenticationException ex) when (ex.HResult == unchecked((int)0x80131501) && retry && enabledSslProtocols >= SslProtocols.Tls11)
{
stream?.Dispose();
tcpServerSocket?.Close();

// Specifying Tls11 and/or Tls12 will disable the usage of Ssl3, even if it has been included.
// https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.tcptransportsecurity.sslprotocols?view=dotnet-plat-ext-3.1
enabledSslProtocols = proxyServer.SupportedSslProtocols & (SslProtocols)0xff;

if (enabledSslProtocols == SslProtocols.None)
{
throw;
}

retry = false;
goto retry;
}
Expand Down