remove not needed sslport parameter

httptests
UbitUmarov 2016-12-08 23:39:55 +00:00
parent 55c04a2410
commit 806e75eefb
3 changed files with 11 additions and 11 deletions

View File

@ -108,7 +108,6 @@ namespace OpenSim.Framework.Servers.HttpServer
new Dictionary<string, WebSocketRequestDelegate>();
protected uint m_port;
protected uint m_sslport;
protected bool m_ssl;
private X509Certificate2 m_cert;
protected string m_SSLCommonName = "";
@ -120,9 +119,14 @@ namespace OpenSim.Framework.Servers.HttpServer
public PollServiceRequestManager PollServiceRequestManager { get; private set; }
public string Protocol
{
get { return m_ssl ? "https://" : "http://"; }
}
public uint SSLPort
{
get { return m_sslport; }
get { return m_port; }
}
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;
if (ssl)
@ -200,7 +204,6 @@ namespace OpenSim.Framework.Servers.HttpServer
m_certCN= "";
m_ssl = true;
m_sslport = sslport;
load_cert(CPath, CPass);
if(!CheckSSLCertHost(CN))
@ -224,7 +227,6 @@ namespace OpenSim.Framework.Servers.HttpServer
if(m_cert.Issuer == m_cert.Subject )
m_log.Warn("Self signed certificate. Http clients need to allow this");
m_ssl = true;
m_sslport = port;
}
else
m_ssl = false;
@ -2101,7 +2103,7 @@ namespace OpenSim.Framework.Servers.HttpServer
catch (Exception e)
{
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
// useful without inbound HTTP.

View File

@ -70,7 +70,7 @@ namespace OpenSim
Initialize();
uint mainport = m_networkServersInfo.HttpListenerPort;
uint mainSSLport =m_networkServersInfo.httpSSLPort;
uint mainSSLport = m_networkServersInfo.httpSSLPort;
if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport))
{
@ -81,11 +81,10 @@ namespace OpenSim
{
m_httpServer = new BaseHttpServer(
mainSSLport, m_networkServersInfo.HttpUsesSSL,
mainSSLport, m_networkServersInfo.HttpSSLCN,
m_networkServersInfo.HttpSSLCN,
m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass);
m_httpServer.Start(true,true);
MainServer.AddHttpServer(m_httpServer);
}
// unsecure main server

View File

@ -59,13 +59,12 @@ namespace OpenSim.Region.ClientStack.Linden.Tests
base.SetUp();
uint port = 9999;
uint sslPort = 9998;
// 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.
MainServer.RemoveHttpServer(port);
BaseHttpServer server = new BaseHttpServer(port, false, sslPort, "","","");
BaseHttpServer server = new BaseHttpServer(port, false, "","","");
MainServer.AddHttpServer(server);
MainServer.Instance = server;