* Updates OGP module to define a default starting point

* An attempt to solve an intermittan SSL Certificate validation error causing communications havok.
0.6.0-stable
Teravus Ovares 2008-08-27 20:27:18 +00:00
parent 3465a5772a
commit f900553b58
1 changed files with 25 additions and 2 deletions

View File

@ -120,11 +120,20 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation; ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation;
} }
catch (NotImplementedException) catch (NotImplementedException)
{
try
{
// Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this!
ServicePointManager.CertificatePolicy = new MonoCert();
}
catch (Exception)
{ {
m_log.Error("[OGP]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions."); m_log.Error("[OGP]: Certificate validation handler change not supported. You may get ssl certificate validation errors teleporting from your region to some SSL regions.");
} }
} }
}
if (!m_scene.Contains(scene)) if (!m_scene.Contains(scene))
m_scene.Add(scene); m_scene.Add(scene);
} }
@ -268,7 +277,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
agentData.lastname = LastName; agentData.lastname = LastName;
agentData.SecureSessionID=LLUUID.Random(); agentData.SecureSessionID=LLUUID.Random();
agentData.SessionID=LLUUID.Random(); agentData.SessionID=LLUUID.Random();
agentData.startpos=LLVector3.Zero; agentData.startpos = new LLVector3(128f, 128f, 100f);
// Pre-Fill our region cache with information on the agent. // Pre-Fill our region cache with information on the agent.
UserAgentData useragent = new UserAgentData(); UserAgentData useragent = new UserAgentData();
@ -557,6 +566,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"]; LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap); responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString()); responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).ToString());
responseMap["sim_host"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_host).ToString()); responseMap["sim_host"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_host).ToString());
@ -876,4 +886,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
} }
} }
public class MonoCert : ICertificatePolicy
{
#region ICertificatePolicy Members
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem)
{
return true;
}
#endregion
}
} }