diff options
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index c078a73..29a8d3f 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -153,11 +153,19 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
153 | m_ssl = ssl; | 153 | m_ssl = ssl; |
154 | } | 154 | } |
155 | 155 | ||
156 | public BaseHttpServer(uint port, bool ssl, uint sslport, string CN) : this (port, ssl) | 156 | public BaseHttpServer(uint port, bool ssl, uint sslport, string CN, string CPath, string CPass) : this (port, ssl) |
157 | { | 157 | { |
158 | if (m_ssl) | 158 | if (m_ssl) |
159 | { | 159 | { |
160 | if(string.IsNullOrEmpty(CPass)) | ||
161 | throw new Exception("invalid main http server cert path"); | ||
162 | |||
160 | m_sslport = sslport; | 163 | m_sslport = sslport; |
164 | m_cert = new X509Certificate2(CPath, CPass); | ||
165 | m_SSLCommonName = m_cert.GetNameInfo(X509NameType.SimpleName,false); | ||
166 | if(CN != m_SSLCommonName) | ||
167 | throw new Exception("main http server CN does not match cert CN"); | ||
168 | |||
161 | } | 169 | } |
162 | } | 170 | } |
163 | 171 | ||