Removed code for supporting .NET < 4.8
This commit is contained in:
@@ -160,21 +160,14 @@ namespace Duplicati.Server.WebServer
|
||||
|
||||
var server = CreateServer(options);
|
||||
|
||||
if (!certValid)
|
||||
server.Start(listenInterface, p);
|
||||
if (certValid)
|
||||
{
|
||||
var secProtocols = System.Security.Authentication.SslProtocols.Tls12 | System.Security.Authentication.SslProtocols.Tls13;
|
||||
server.Start(listenInterface, p, cert, secProtocols, null, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
var secProtocols = System.Security.Authentication.SslProtocols.Tls12;
|
||||
|
||||
try
|
||||
{
|
||||
//try TLS 1.3 (type not available on .NET < 4.8)
|
||||
secProtocols = System.Security.Authentication.SslProtocols.Tls12 | (System.Security.Authentication.SslProtocols)12288;
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
server.Start(listenInterface, p, cert, secProtocols, null, false);
|
||||
server.Start(listenInterface, p);
|
||||
}
|
||||
|
||||
m_server = server;
|
||||
|
||||
@@ -184,17 +184,7 @@ namespace Duplicati.GUI.TrayIcon
|
||||
{
|
||||
try
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
try
|
||||
{
|
||||
//try TLS 1.3 (type not available on .NET < 4.8)
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | (SecurityProtocolType)12288;
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
}
|
||||
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
|
||||
using (Connection = new HttpServerConnection(serverURL, password, saltedpassword, databaseConnection != null ? PasswordSource.Database : PasswordSource.HostedServer, disableTrayIconLogin, options))
|
||||
{
|
||||
using (var tk = RunTrayIcon())
|
||||
|
||||
Reference in New Issue
Block a user