* 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

@ -121,8 +121,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
}
catch (NotImplementedException)
{
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.");
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.");
}
}
}
if (!m_scene.Contains(scene))
@ -268,7 +277,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
agentData.lastname = LastName;
agentData.SecureSessionID=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.
UserAgentData useragent = new UserAgentData();
@ -556,6 +565,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
string rrAccess = rezResponseMap["sim_access"].AsString();
LLSDArray RezResponsePositionArray = (LLSDArray)rezResponseMap["position"];
responseMap["seed_capability"] = LLSD.FromString(rezRespSeedCap);
responseMap["sim_ip"] = LLSD.FromString(Util.GetHostFromDNS(rezRespSim_ip).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
}
}