remove not needed sslport parameter
parent
55c04a2410
commit
806e75eefb
|
@ -108,7 +108,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
new Dictionary<string, WebSocketRequestDelegate>();
|
new Dictionary<string, WebSocketRequestDelegate>();
|
||||||
|
|
||||||
protected uint m_port;
|
protected uint m_port;
|
||||||
protected uint m_sslport;
|
|
||||||
protected bool m_ssl;
|
protected bool m_ssl;
|
||||||
private X509Certificate2 m_cert;
|
private X509Certificate2 m_cert;
|
||||||
protected string m_SSLCommonName = "";
|
protected string m_SSLCommonName = "";
|
||||||
|
@ -120,9 +119,14 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
public PollServiceRequestManager PollServiceRequestManager { get; private set; }
|
public PollServiceRequestManager PollServiceRequestManager { get; private set; }
|
||||||
|
|
||||||
|
public string Protocol
|
||||||
|
{
|
||||||
|
get { return m_ssl ? "https://" : "http://"; }
|
||||||
|
}
|
||||||
|
|
||||||
public uint SSLPort
|
public uint SSLPort
|
||||||
{
|
{
|
||||||
get { return m_sslport; }
|
get { return m_port; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string SSLCommonName
|
public string SSLCommonName
|
||||||
|
@ -184,7 +188,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseHttpServer(uint port, bool ssl, uint sslport, string CN, string CPath, string CPass)
|
public BaseHttpServer(uint port, bool ssl, string CN, string CPath, string CPass)
|
||||||
{
|
{
|
||||||
m_port = port;
|
m_port = port;
|
||||||
if (ssl)
|
if (ssl)
|
||||||
|
@ -200,7 +204,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
m_certCN= "";
|
m_certCN= "";
|
||||||
|
|
||||||
m_ssl = true;
|
m_ssl = true;
|
||||||
m_sslport = sslport;
|
|
||||||
load_cert(CPath, CPass);
|
load_cert(CPath, CPass);
|
||||||
|
|
||||||
if(!CheckSSLCertHost(CN))
|
if(!CheckSSLCertHost(CN))
|
||||||
|
@ -224,7 +227,6 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
if(m_cert.Issuer == m_cert.Subject )
|
if(m_cert.Issuer == m_cert.Subject )
|
||||||
m_log.Warn("Self signed certificate. Http clients need to allow this");
|
m_log.Warn("Self signed certificate. Http clients need to allow this");
|
||||||
m_ssl = true;
|
m_ssl = true;
|
||||||
m_sslport = port;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_ssl = false;
|
m_ssl = false;
|
||||||
|
@ -2101,7 +2103,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
|
m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message);
|
||||||
m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?");
|
m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + "?");
|
||||||
|
|
||||||
// We want this exception to halt the entire server since in current configurations we aren't too
|
// We want this exception to halt the entire server since in current configurations we aren't too
|
||||||
// useful without inbound HTTP.
|
// useful without inbound HTTP.
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace OpenSim
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
||||||
uint mainport = m_networkServersInfo.HttpListenerPort;
|
uint mainport = m_networkServersInfo.HttpListenerPort;
|
||||||
uint mainSSLport =m_networkServersInfo.httpSSLPort;
|
uint mainSSLport = m_networkServersInfo.httpSSLPort;
|
||||||
|
|
||||||
if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport))
|
if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport))
|
||||||
{
|
{
|
||||||
|
@ -81,11 +81,10 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
m_httpServer = new BaseHttpServer(
|
m_httpServer = new BaseHttpServer(
|
||||||
mainSSLport, m_networkServersInfo.HttpUsesSSL,
|
mainSSLport, m_networkServersInfo.HttpUsesSSL,
|
||||||
mainSSLport, m_networkServersInfo.HttpSSLCN,
|
m_networkServersInfo.HttpSSLCN,
|
||||||
m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass);
|
m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass);
|
||||||
m_httpServer.Start(true,true);
|
m_httpServer.Start(true,true);
|
||||||
MainServer.AddHttpServer(m_httpServer);
|
MainServer.AddHttpServer(m_httpServer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// unsecure main server
|
// unsecure main server
|
||||||
|
|
|
@ -59,13 +59,12 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
|
||||||
base.SetUp();
|
base.SetUp();
|
||||||
|
|
||||||
uint port = 9999;
|
uint port = 9999;
|
||||||
uint sslPort = 9998;
|
|
||||||
|
|
||||||
// This is an unfortunate bit of clean up we have to do because MainServer manages things through static
|
// This is an unfortunate bit of clean up we have to do because MainServer manages things through static
|
||||||
// variables and the VM is not restarted between tests.
|
// variables and the VM is not restarted between tests.
|
||||||
MainServer.RemoveHttpServer(port);
|
MainServer.RemoveHttpServer(port);
|
||||||
|
|
||||||
BaseHttpServer server = new BaseHttpServer(port, false, sslPort, "","","");
|
BaseHttpServer server = new BaseHttpServer(port, false, "","","");
|
||||||
MainServer.AddHttpServer(server);
|
MainServer.AddHttpServer(server);
|
||||||
MainServer.Instance = server;
|
MainServer.Instance = server;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue