recover regions main http server ssl suport. Using a PKCS12 cert file, and not certs store for now. Option http_listener_cn, cert CN need to the same as external IP. Self sign certs do seem to work, but the viewers option NoVerifySLLCert needs to be set true. CA check is not done but they do check the IP

This commit is contained in:
UbitUmarov
2016-10-06 21:35:11 +01:00
parent db1e75b0ac
commit b51739e23e
7 changed files with 53 additions and 16 deletions

View File

@@ -351,7 +351,18 @@ namespace OpenSim
if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true))
WorkManager.JobEngine.Start();
m_httpServerPort = m_networkServersInfo.HttpListenerPort;
if(m_networkServersInfo.HttpUsesSSL)
{
m_httpServerSSL = true;
m_httpServerPort = m_networkServersInfo.httpSSLPort;
}
else
{
m_httpServerSSL = false;
m_httpServerPort = m_networkServersInfo.HttpListenerPort;
}
SceneManager.OnRestartSim += HandleRestartRegion;
// Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is
@@ -404,7 +415,18 @@ namespace OpenSim
// set initial ServerURI
regionInfo.HttpPort = m_httpServerPort;
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/";
if(m_httpServerSSL)
{
if(m_networkServersInfo.HttpSSLCN != regionInfo.ExternalHostName)
throw new Exception("main http cert CN doesn't match region External IP");
regionInfo.ServerURI = "https://" + regionInfo.ExternalHostName +
":" + regionInfo.HttpPort.ToString() + "/";
}
else
regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName +
":" + regionInfo.HttpPort.ToString() + "/";
regionInfo.osSecret = m_osSecret;