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

Commit

Permalink
Merge pull request #763 from justcoding121/master
Browse files Browse the repository at this point in the history
beta
  • Loading branch information
honfika authored May 3, 2020
2 parents 7e42d56 + 0052e4a commit 5720a33
Showing 1 changed file with 26 additions and 1 deletion.
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

0 comments on commit 5720a33

Please sign in to comment.