diff options
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index b33e2c2..75dc741 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -351,7 +351,18 @@ namespace OpenSim | |||
351 | if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) | 351 | if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) |
352 | WorkManager.JobEngine.Start(); | 352 | WorkManager.JobEngine.Start(); |
353 | 353 | ||
354 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | 354 | |
355 | if(m_networkServersInfo.HttpUsesSSL) | ||
356 | { | ||
357 | m_httpServerSSL = true; | ||
358 | m_httpServerPort = m_networkServersInfo.httpSSLPort; | ||
359 | } | ||
360 | else | ||
361 | { | ||
362 | m_httpServerSSL = false; | ||
363 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | ||
364 | } | ||
365 | |||
355 | SceneManager.OnRestartSim += HandleRestartRegion; | 366 | SceneManager.OnRestartSim += HandleRestartRegion; |
356 | 367 | ||
357 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is | 368 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is |
@@ -404,7 +415,18 @@ namespace OpenSim | |||
404 | 415 | ||
405 | // set initial ServerURI | 416 | // set initial ServerURI |
406 | regionInfo.HttpPort = m_httpServerPort; | 417 | regionInfo.HttpPort = m_httpServerPort; |
407 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; | 418 | if(m_httpServerSSL) |
419 | { | ||
420 | if(!m_httpServer.CheckSSLCertHost(regionInfo.ExternalHostName)) | ||
421 | throw new Exception("main http cert CN doesn't match region External IP"); | ||
422 | |||
423 | regionInfo.ServerURI = "https://" + regionInfo.ExternalHostName + | ||
424 | ":" + regionInfo.HttpPort.ToString() + "/"; | ||
425 | } | ||
426 | else | ||
427 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + | ||
428 | ":" + regionInfo.HttpPort.ToString() + "/"; | ||
429 | |||
408 | 430 | ||
409 | regionInfo.osSecret = m_osSecret; | 431 | regionInfo.osSecret = m_osSecret; |
410 | 432 | ||
@@ -1103,10 +1125,10 @@ namespace OpenSim | |||
1103 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | 1125 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); |
1104 | } | 1126 | } |
1105 | } | 1127 | } |
1106 | } | 1128 | } |
1107 | 1129 | ||
1108 | return true; // need to update the database | 1130 | return true; // need to update the database |
1109 | } | 1131 | } |
1110 | } | 1132 | } |
1111 | 1133 | ||
1112 | public class OpenSimConfigSource | 1134 | public class OpenSimConfigSource |