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 --- .../Framework/Servers/HttpServer/BaseHttpServer.cs | 4 ++++ bin/HttpServer_OpenSim.dll | Bin 130560 -> 131584 bytes bin/HttpServer_OpenSim.pdb | Bin 355840 -> 357888 bytes 3 files changed, 4 insertions(+) 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; } diff --git a/bin/HttpServer_OpenSim.dll b/bin/HttpServer_OpenSim.dll index 121ec82..3b49692 100755 Binary files a/bin/HttpServer_OpenSim.dll and b/bin/HttpServer_OpenSim.dll differ diff --git a/bin/HttpServer_OpenSim.pdb b/bin/HttpServer_OpenSim.pdb index c2a3fd9..9f6691f 100644 Binary files a/bin/HttpServer_OpenSim.pdb and b/bin/HttpServer_OpenSim.pdb differ -- cgit v1.1