This repository was archived by the owner on Jul 9, 2023. It is now read-only.
File tree 1 file changed +26
-1
lines changed
src/Titanium.Web.Proxy/Network/Tcp
1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -546,7 +546,32 @@ private async Task<TcpServerConnection> createServerConnection(string remoteHost
546
546
stream ? . Dispose ( ) ;
547
547
tcpServerSocket ? . Close ( ) ;
548
548
549
- enabledSslProtocols = SslProtocols . Tls ;
549
+ // Specifying Tls11 and/or Tls12 will disable the usage of Ssl3, even if it has been included.
550
+ // https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.tcptransportsecurity.sslprotocols?view=dotnet-plat-ext-3.1
551
+ enabledSslProtocols = proxyServer . SupportedSslProtocols & ( SslProtocols ) 0xff ;
552
+
553
+ if ( enabledSslProtocols == SslProtocols . None )
554
+ {
555
+ throw ;
556
+ }
557
+
558
+ retry = false ;
559
+ goto retry ;
560
+ }
561
+ catch ( AuthenticationException ex ) when ( ex . HResult == unchecked ( ( int ) 0x80131501 ) && retry && enabledSslProtocols >= SslProtocols . Tls11 )
562
+ {
563
+ stream ? . Dispose ( ) ;
564
+ tcpServerSocket ? . Close ( ) ;
565
+
566
+ // Specifying Tls11 and/or Tls12 will disable the usage of Ssl3, even if it has been included.
567
+ // https://docs.microsoft.com/en-us/dotnet/api/system.servicemodel.tcptransportsecurity.sslprotocols?view=dotnet-plat-ext-3.1
568
+ enabledSslProtocols = proxyServer . SupportedSslProtocols & ( SslProtocols ) 0xff ;
569
+
570
+ if ( enabledSslProtocols == SslProtocols . None )
571
+ {
572
+ throw ;
573
+ }
574
+
550
575
retry = false ;
551
576
goto retry ;
552
577
}
You can’t perform that action at this time.
0 commit comments