current vivox server certs are invalid

master
UbitUmarov 2020-03-10 13:42:09 +00:00
parent c172adbaec
commit beee52032e
2 changed files with 16 additions and 0 deletions

View File

@ -33,6 +33,8 @@ using System.Globalization;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;
using System.Net; using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Web; using System.Web;
@ -92,6 +94,19 @@ namespace OpenSim.Framework
/// </remarks> /// </remarks>
public const int MaxRequestDiagLength = 200; public const int MaxRequestDiagLength = 200;
public static bool ValidateServerCertificateNoChecks(
object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
sslPolicyErrors &= ~SslPolicyErrors.RemoteCertificateChainErrors;
sslPolicyErrors &= ~SslPolicyErrors.RemoteCertificateNameMismatch;
if (sslPolicyErrors == SslPolicyErrors.None)
return true;
return false;
}
#region JSONRequest #region JSONRequest
/// <summary> /// <summary>

View File

@ -1162,6 +1162,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
//m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl); //m_log.DebugFormat("[VivoxVoice] Sending request <{0}>", requrl);
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl); HttpWebRequest req = (HttpWebRequest)WebRequest.Create(requrl);
req.ServerCertificateValidationCallback = WebUtil.ValidateServerCertificateNoChecks; // vivox servers have invalid certs
// We are sending just parameters, no content // We are sending just parameters, no content
req.ContentLength = 0; req.ContentLength = 0;