diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 32 | ||||
-rw-r--r-- | OpenSim/Region/Application/Properties/AssemblyInfo.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Application/RegionApplicationBase.cs | 48 |
3 files changed, 61 insertions, 21 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 |
diff --git a/OpenSim/Region/Application/Properties/AssemblyInfo.cs b/OpenSim/Region/Application/Properties/AssemblyInfo.cs index 09772d3..0a75094 100644 --- a/OpenSim/Region/Application/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Application/Properties/AssemblyInfo.cs | |||
@@ -7,7 +7,7 @@ using Mono.Addins; | |||
7 | // set of attributes. Change these attribute values to modify the information | 7 | // set of attributes. Change these attribute values to modify the information |
8 | // associated with an assembly. | 8 | // associated with an assembly. |
9 | [assembly: AssemblyTitle("OpenSim")] | 9 | [assembly: AssemblyTitle("OpenSim")] |
10 | [assembly: AssemblyDescription("The executable for for simulator")] | 10 | [assembly: AssemblyDescription("The executable for regions simulator")] |
11 | [assembly: AssemblyConfiguration("")] | 11 | [assembly: AssemblyConfiguration("")] |
12 | [assembly: AssemblyCompany("http://opensimulator.org")] | 12 | [assembly: AssemblyCompany("http://opensimulator.org")] |
13 | [assembly: AssemblyProduct("OpenSim")] | 13 | [assembly: AssemblyProduct("OpenSim")] |
diff --git a/OpenSim/Region/Application/RegionApplicationBase.cs b/OpenSim/Region/Application/RegionApplicationBase.cs index 83a9fff..0112c1e 100644 --- a/OpenSim/Region/Application/RegionApplicationBase.cs +++ b/OpenSim/Region/Application/RegionApplicationBase.cs | |||
@@ -50,6 +50,7 @@ namespace OpenSim | |||
50 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 50 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
51 | protected NetworkServersInfo m_networkServersInfo; | 51 | protected NetworkServersInfo m_networkServersInfo; |
52 | protected uint m_httpServerPort; | 52 | protected uint m_httpServerPort; |
53 | protected bool m_httpServerSSL; | ||
53 | protected ISimulationDataService m_simulationDataService; | 54 | protected ISimulationDataService m_simulationDataService; |
54 | protected IEstateDataService m_estateDataService; | 55 | protected IEstateDataService m_estateDataService; |
55 | 56 | ||
@@ -68,20 +69,37 @@ namespace OpenSim | |||
68 | 69 | ||
69 | Initialize(); | 70 | Initialize(); |
70 | 71 | ||
71 | m_httpServer | 72 | uint mainport = m_networkServersInfo.HttpListenerPort; |
72 | = new BaseHttpServer( | 73 | uint mainSSLport = m_networkServersInfo.httpSSLPort; |
73 | m_httpServerPort, m_networkServersInfo.HttpUsesSSL, m_networkServersInfo.httpSSLPort, | ||
74 | m_networkServersInfo.HttpSSLCN); | ||
75 | 74 | ||
76 | if (m_networkServersInfo.HttpUsesSSL && (m_networkServersInfo.HttpListenerPort == m_networkServersInfo.httpSSLPort)) | 75 | if (m_networkServersInfo.HttpUsesSSL && (mainport == mainSSLport)) |
77 | { | 76 | { |
78 | m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); | 77 | m_log.Error("[REGION SERVER]: HTTP Server config failed. HTTP Server and HTTPS server must be on different ports"); |
79 | } | 78 | } |
80 | 79 | ||
81 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0}", m_httpServerPort); | 80 | if(m_networkServersInfo.HttpUsesSSL) |
82 | m_httpServer.Start(); | 81 | { |
82 | m_httpServer = new BaseHttpServer( | ||
83 | mainSSLport, m_networkServersInfo.HttpUsesSSL, | ||
84 | m_networkServersInfo.HttpSSLCN, | ||
85 | m_networkServersInfo.HttpSSLCertPath, m_networkServersInfo.HttpSSLCNCertPass); | ||
86 | m_httpServer.Start(true,true); | ||
87 | MainServer.AddHttpServer(m_httpServer); | ||
88 | } | ||
89 | |||
90 | // unsecure main server | ||
91 | BaseHttpServer server = new BaseHttpServer(mainport); | ||
92 | if(!m_networkServersInfo.HttpUsesSSL) | ||
93 | { | ||
94 | m_httpServer = server; | ||
95 | server.Start(true, true); | ||
96 | } | ||
97 | else | ||
98 | server.Start(false, false); | ||
99 | |||
100 | MainServer.AddHttpServer(server); | ||
101 | MainServer.UnSecureInstance = server; | ||
83 | 102 | ||
84 | MainServer.AddHttpServer(m_httpServer); | ||
85 | MainServer.Instance = m_httpServer; | 103 | MainServer.Instance = m_httpServer; |
86 | 104 | ||
87 | // "OOB" Server | 105 | // "OOB" Server |
@@ -89,22 +107,22 @@ namespace OpenSim | |||
89 | { | 107 | { |
90 | if (!m_networkServersInfo.ssl_external) | 108 | if (!m_networkServersInfo.ssl_external) |
91 | { | 109 | { |
92 | BaseHttpServer server = new BaseHttpServer( | 110 | server = new BaseHttpServer( |
93 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | 111 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, |
112 | m_networkServersInfo.cert_path, | ||
94 | m_networkServersInfo.cert_pass); | 113 | m_networkServersInfo.cert_pass); |
95 | 114 | ||
96 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); | 115 | m_log.InfoFormat("[REGION SERVER]: Starting OOB HTTPS server on port {0}", server.SSLPort); |
116 | server.Start(false, false); | ||
97 | MainServer.AddHttpServer(server); | 117 | MainServer.AddHttpServer(server); |
98 | server.Start(); | ||
99 | } | 118 | } |
100 | else | 119 | else |
101 | { | 120 | { |
102 | BaseHttpServer server = new BaseHttpServer( | 121 | server = new BaseHttpServer(m_networkServersInfo.https_port); |
103 | m_networkServersInfo.https_port); | ||
104 | 122 | ||
105 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); | 123 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); |
124 | server.Start(false, false); | ||
106 | MainServer.AddHttpServer(server); | 125 | MainServer.AddHttpServer(server); |
107 | server.Start(); | ||
108 | } | 126 | } |
109 | } | 127 | } |
110 | 128 | ||