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 0862fcf..757e255 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -353,7 +353,18 @@ namespace OpenSim | |||
353 | if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) | 353 | if (startupConfig == null || startupConfig.GetBoolean("JobEngineEnabled", true)) |
354 | WorkManager.JobEngine.Start(); | 354 | WorkManager.JobEngine.Start(); |
355 | 355 | ||
356 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | 356 | |
357 | if(m_networkServersInfo.HttpUsesSSL) | ||
358 | { | ||
359 | m_httpServerSSL = true; | ||
360 | m_httpServerPort = m_networkServersInfo.httpSSLPort; | ||
361 | } | ||
362 | else | ||
363 | { | ||
364 | m_httpServerSSL = false; | ||
365 | m_httpServerPort = m_networkServersInfo.HttpListenerPort; | ||
366 | } | ||
367 | |||
357 | SceneManager.OnRestartSim += HandleRestartRegion; | 368 | SceneManager.OnRestartSim += HandleRestartRegion; |
358 | 369 | ||
359 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is | 370 | // Only enable the watchdogs when all regions are ready. Otherwise we get false positives when cpu is |
@@ -406,7 +417,18 @@ namespace OpenSim | |||
406 | 417 | ||
407 | // set initial ServerURI | 418 | // set initial ServerURI |
408 | regionInfo.HttpPort = m_httpServerPort; | 419 | regionInfo.HttpPort = m_httpServerPort; |
409 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + ":" + regionInfo.HttpPort.ToString() + "/"; | 420 | if(m_httpServerSSL) |
421 | { | ||
422 | if(!m_httpServer.CheckSSLCertHost(regionInfo.ExternalHostName)) | ||
423 | throw new Exception("main http cert CN doesn't match region External IP"); | ||
424 | |||
425 | regionInfo.ServerURI = "https://" + regionInfo.ExternalHostName + | ||
426 | ":" + regionInfo.HttpPort.ToString() + "/"; | ||
427 | } | ||
428 | else | ||
429 | regionInfo.ServerURI = "http://" + regionInfo.ExternalHostName + | ||
430 | ":" + regionInfo.HttpPort.ToString() + "/"; | ||
431 | |||
410 | 432 | ||
411 | regionInfo.osSecret = m_osSecret; | 433 | regionInfo.osSecret = m_osSecret; |
412 | 434 | ||
@@ -1104,10 +1126,10 @@ namespace OpenSim | |||
1104 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); | 1126 | MainConsole.Instance.Output("Joining the estate failed. Please try again."); |
1105 | } | 1127 | } |
1106 | } | 1128 | } |
1107 | } | 1129 | } |
1108 | 1130 | ||
1109 | return true; // need to update the database | 1131 | return true; // need to update the database |
1110 | } | 1132 | } |
1111 | } | 1133 | } |
1112 | 1134 | ||
1113 | public class OpenSimConfigSource | 1135 | public class OpenSimConfigSource |