From 6627da693e48836334016e26ddc1cd71b99e0fa8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 9 Dec 2016 04:07:06 +0000 Subject: suport client certificate validation per listenner, with a supplied static callback --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Framework/Servers') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 01d427e..0492b51 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -32,6 +32,7 @@ using System.Collections.Specialized; using System.IO; using System.Net; using System.Net.Sockets; +using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Reflection; using System.Globalization; @@ -114,6 +115,7 @@ namespace OpenSim.Framework.Servers.HttpServer protected List m_certNames = new List(); protected List m_certIPs = new List(); protected string m_certCN= ""; + protected RemoteCertificateValidationCallback m_certificateValidationCallback = null; protected IPAddress m_listenIPAddress = IPAddress.Any; @@ -2076,6 +2078,8 @@ namespace OpenSim.Framework.Servers.HttpServer //m_httpListener.Prefixes.Add("https://+:" + (m_sslport) + "/"); //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); m_httpListener2 = CoolHTTPListener.Create(IPAddress.Any, (int)m_port, m_cert); + if(m_certificateValidationCallback != null) + m_httpListener2.CertificateValidationCallback = m_certificateValidationCallback; m_httpListener2.ExceptionThrown += httpServerException; m_httpListener2.LogWriter = httpserverlog; } -- cgit v1.1