diff options
author | UbitUmarov | 2016-12-09 04:07:06 +0000 |
---|---|---|
committer | UbitUmarov | 2016-12-09 04:07:06 +0000 |
commit | 6627da693e48836334016e26ddc1cd71b99e0fa8 (patch) | |
tree | 318ed00a368b24b6d0077ee0f8ecda1f7ec40945 /OpenSim/Framework/Servers/HttpServer | |
parent | remove not needed sslport parameter (diff) | |
download | opensim-SC-6627da693e48836334016e26ddc1cd71b99e0fa8.zip opensim-SC-6627da693e48836334016e26ddc1cd71b99e0fa8.tar.gz opensim-SC-6627da693e48836334016e26ddc1cd71b99e0fa8.tar.bz2 opensim-SC-6627da693e48836334016e26ddc1cd71b99e0fa8.tar.xz |
suport client certificate validation per listenner, with a supplied static callback
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 4 |
1 files changed, 4 insertions, 0 deletions
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; | |||
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Net; | 33 | using System.Net; |
34 | using System.Net.Sockets; | 34 | using System.Net.Sockets; |
35 | using System.Net.Security; | ||
35 | using System.Security.Cryptography.X509Certificates; | 36 | using System.Security.Cryptography.X509Certificates; |
36 | using System.Reflection; | 37 | using System.Reflection; |
37 | using System.Globalization; | 38 | using System.Globalization; |
@@ -114,6 +115,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
114 | protected List<string> m_certNames = new List<string>(); | 115 | protected List<string> m_certNames = new List<string>(); |
115 | protected List<string> m_certIPs = new List<string>(); | 116 | protected List<string> m_certIPs = new List<string>(); |
116 | protected string m_certCN= ""; | 117 | protected string m_certCN= ""; |
118 | protected RemoteCertificateValidationCallback m_certificateValidationCallback = null; | ||
117 | 119 | ||
118 | protected IPAddress m_listenIPAddress = IPAddress.Any; | 120 | protected IPAddress m_listenIPAddress = IPAddress.Any; |
119 | 121 | ||
@@ -2076,6 +2078,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
2076 | //m_httpListener.Prefixes.Add("https://+:" + (m_sslport) + "/"); | 2078 | //m_httpListener.Prefixes.Add("https://+:" + (m_sslport) + "/"); |
2077 | //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); | 2079 | //m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); |
2078 | m_httpListener2 = CoolHTTPListener.Create(IPAddress.Any, (int)m_port, m_cert); | 2080 | m_httpListener2 = CoolHTTPListener.Create(IPAddress.Any, (int)m_port, m_cert); |
2081 | if(m_certificateValidationCallback != null) | ||
2082 | m_httpListener2.CertificateValidationCallback = m_certificateValidationCallback; | ||
2079 | m_httpListener2.ExceptionThrown += httpServerException; | 2083 | m_httpListener2.ExceptionThrown += httpServerException; |
2080 | m_httpListener2.LogWriter = httpserverlog; | 2084 | m_httpListener2.LogWriter = httpserverlog; |
2081 | } | 2085 | } |