diff options
author | Teravus Ovares | 2008-09-14 18:39:17 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-14 18:39:17 +0000 |
commit | dbbbec48dfbc51f30953d8a46f4fc8f192bd277c (patch) | |
tree | 218f93b95724e8bdc9a9c6e986268f2101c1eb6e /OpenSim/Region/Environment | |
parent | Added some further clipping to color- and alpha-values. (diff) | |
download | opensim-SC_OLD-dbbbec48dfbc51f30953d8a46f4fc8f192bd277c.zip opensim-SC_OLD-dbbbec48dfbc51f30953d8a46f4fc8f192bd277c.tar.gz opensim-SC_OLD-dbbbec48dfbc51f30953d8a46f4fc8f192bd277c.tar.bz2 opensim-SC_OLD-dbbbec48dfbc51f30953d8a46f4fc8f192bd277c.tar.xz |
* This update makes configuring SSL a little easier on Windows XP. It also makes it possible to run a HTTPS server on the region. It also has a junk Certification authority for test purposes.
* There are still a lot of things that are hard coded to use http. They need to be fixed.
* Also includes directions
* A standard junk PEM file to append to app_settings/CA.pem in the client so SSL will work
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index 6e37b95..68f35e8 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -86,6 +86,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
86 | private Dictionary<UUID, OGPState> m_OGPState = new Dictionary<UUID, OGPState>(); | 86 | private Dictionary<UUID, OGPState> m_OGPState = new Dictionary<UUID, OGPState>(); |
87 | private string LastNameSuffix = "_EXTERNAL"; | 87 | private string LastNameSuffix = "_EXTERNAL"; |
88 | private string FirstNamePrefix = ""; | 88 | private string FirstNamePrefix = ""; |
89 | private string httpsCN = ""; | ||
90 | private bool httpSSL = false; | ||
91 | private uint httpsslport = 0; | ||
89 | 92 | ||
90 | #region IRegionModule Members | 93 | #region IRegionModule Members |
91 | 94 | ||
@@ -93,6 +96,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
93 | { | 96 | { |
94 | bool enabled = false; | 97 | bool enabled = false; |
95 | IConfig cfg = null; | 98 | IConfig cfg = null; |
99 | IConfig httpcfg = null; | ||
96 | try | 100 | try |
97 | { | 101 | { |
98 | cfg = config.Configs["OpenGridProtocol"]; | 102 | cfg = config.Configs["OpenGridProtocol"]; |
@@ -100,6 +104,16 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
100 | { | 104 | { |
101 | enabled = false; | 105 | enabled = false; |
102 | } | 106 | } |
107 | |||
108 | try | ||
109 | { | ||
110 | httpcfg = config.Configs["Network"]; | ||
111 | } | ||
112 | catch (NullReferenceException) | ||
113 | { | ||
114 | |||
115 | } | ||
116 | |||
103 | if (cfg != null) | 117 | if (cfg != null) |
104 | { | 118 | { |
105 | enabled = cfg.GetBoolean("ogp_enabled", false); | 119 | enabled = cfg.GetBoolean("ogp_enabled", false); |
@@ -139,6 +153,20 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
139 | } | 153 | } |
140 | } | 154 | } |
141 | } | 155 | } |
156 | lock (m_scene) | ||
157 | { | ||
158 | if (m_scene.Count == 1) | ||
159 | { | ||
160 | if (httpcfg != null) | ||
161 | { | ||
162 | httpSSL = httpcfg.GetBoolean("http_listener_ssl", false); | ||
163 | httpsCN = httpcfg.GetString("http_listener_cn", scene.RegionInfo.ExternalHostName); | ||
164 | if (httpsCN.Length == 0) | ||
165 | httpsCN = scene.RegionInfo.ExternalHostName; | ||
166 | httpsslport = (uint)httpcfg.GetInt("http_listener_sslport",((int)scene.RegionInfo.HttpPort + 1)); | ||
167 | } | ||
168 | } | ||
169 | } | ||
142 | // Of interest to this module potentially | 170 | // Of interest to this module potentially |
143 | //scene.EventManager.OnNewClient += OnNewClient; | 171 | //scene.EventManager.OnNewClient += OnNewClient; |
144 | //scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; | 172 | //scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; |
@@ -371,14 +399,35 @@ namespace OpenSim.Region.Environment.Modules.InterGrid | |||
371 | // Get a reference to the user's cap so we can pull out the Caps Object Path | 399 | // Get a reference to the user's cap so we can pull out the Caps Object Path |
372 | OpenSim.Framework.Communications.Capabilities.Caps userCap = homeScene.GetCapsHandlerForUser(agentData.AgentID); | 400 | OpenSim.Framework.Communications.Capabilities.Caps userCap = homeScene.GetCapsHandlerForUser(agentData.AgentID); |
373 | 401 | ||
402 | string rezHttpProtocol = "http://"; | ||
403 | string regionCapsHttpProtocol = "http://"; | ||
404 | string httpaddr = reg.ExternalHostName; | ||
405 | string urlport = reg.HttpPort.ToString(); | ||
406 | |||
407 | |||
408 | if (httpSSL) | ||
409 | { | ||
410 | rezHttpProtocol = "https://"; | ||
411 | |||
412 | urlport = httpsslport.ToString(); | ||
413 | |||
414 | if (httpsCN.Length > 0) | ||
415 | httpaddr = httpsCN; | ||
416 | } | ||
417 | |||
418 | |||
419 | // Be warned that the two following lines assume http not | ||
420 | // https since region caps are not implemented in https currently | ||
421 | |||
374 | // DEPRECIATED | 422 | // DEPRECIATED |
375 | responseMap["seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); | 423 | responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); |
376 | 424 | ||
377 | // REPLACEMENT | 425 | // REPLACEMENT |
378 | responseMap["region_seed_capability"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); | 426 | responseMap["region_seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/"); |
427 | |||
379 | 428 | ||
380 | responseMap["rez_avatar/rez"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + rezAvatarPath); | 429 | responseMap["rez_avatar/rez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + rezAvatarPath); |
381 | responseMap["rez_avatar/derez"] = LLSD.FromString("http://" + reg.ExternalHostName + ":" + reg.HttpPort + derezAvatarPath); | 430 | responseMap["rez_avatar/derez"] = LLSD.FromString(rezHttpProtocol + httpaddr + ":" + urlport + derezAvatarPath); |
382 | 431 | ||
383 | // Add the user to the list of CAPS that are outstanding. | 432 | // Add the user to the list of CAPS that are outstanding. |
384 | // well allow the caps hosts in this dictionary | 433 | // well allow the caps hosts in this dictionary |