diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpListener.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpListener.cs
index 7ebadba9e7..f48dfdae85 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpListener.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpServer/HttpListener.cs
@@ -15,7 +15,11 @@ namespace OSHttpServer
private readonly IHttpContextFactory m_contextFactory;
private readonly int m_port;
private readonly ManualResetEvent m_shutdownEvent = new ManualResetEvent(false);
- private readonly SslProtocols m_sslProtocol = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Ssl3 | SslProtocols.Ssl2;
+#if NET48
+ private readonly SslProtocols m_sslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Tls13 | SslProtocols.Ssl3 | SslProtocols.Ssl2;
+#else
+ private readonly SslProtocols m_sslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12 | SslProtocols.Ssl3 | SslProtocols.Ssl2;
+#endif
private TcpListener m_listener;
private ILogWriter m_logWriter = NullLogWriter.Instance;
private int m_pendingAccepts;
@@ -62,13 +66,13 @@ namespace OSHttpServer
/// TCP Port to listen on, default HTTPS port is 443
/// Factory used to create es.
/// Certificate to use
- /// which HTTPS protocol to use, default is TLS.
+ /// which HTTPS protocol to use, default is TLS.
protected OSHttpListener(IPAddress address, int port, X509Certificate certificate,
- SslProtocols protocol)
+ SslProtocols protocols)
: this(address, port)
{
m_certificate = certificate;
- m_sslProtocol = protocol;
+ m_sslProtocols = protocols;
}
public static OSHttpListener Create(IPAddress address, int port)
@@ -81,9 +85,9 @@ namespace OSHttpServer
return new OSHttpListener(address, port, certificate);
}
- public static OSHttpListener Create(IPAddress address, int port, X509Certificate certificate, SslProtocols protocol)
+ public static OSHttpListener Create(IPAddress address, int port, X509Certificate certificate, SslProtocols protocols)
{
- return new OSHttpListener(address, port, certificate, protocol);
+ return new OSHttpListener(address, port, certificate, protocols);
}
private void OnRequestReceived(object sender, RequestEventArgs e)
@@ -110,7 +114,7 @@ namespace OSHttpServer
m_logWriter = value ?? NullLogWriter.Instance;
if (m_certificate != null)
m_logWriter.Write(this, LogPrio.Info,
- "HTTPS(" + m_sslProtocol + ") listening on " + m_address + ":" + m_port);
+ "HTTPS(" + m_sslProtocols + ") listening on " + m_address + ":" + m_port);
else
m_logWriter.Write(this, LogPrio.Info, "HTTP listening on " + m_address + ":" + m_port);
}
@@ -159,7 +163,7 @@ namespace OSHttpServer
m_logWriter.Write(this, LogPrio.Debug, "Accepted connection from: " + socket.RemoteEndPoint);
if (m_certificate != null)
- m_contextFactory.CreateSecureContext(socket, m_certificate, m_sslProtocol, m_clientCertValCallback);
+ m_contextFactory.CreateSecureContext(socket, m_certificate, m_sslProtocols, m_clientCertValCallback);
else
m_contextFactory.CreateContext(socket);
}