diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/NetworkServersInfo.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Framework/NetworkServersInfo.cs b/OpenSim/Framework/NetworkServersInfo.cs index dfe9695..d79eb0d 100644 --- a/OpenSim/Framework/NetworkServersInfo.cs +++ b/OpenSim/Framework/NetworkServersInfo.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Framework | |||
37 | public bool isSandbox; | 37 | public bool isSandbox; |
38 | public bool HttpUsesSSL = false; | 38 | public bool HttpUsesSSL = false; |
39 | public string HttpSSLCN = ""; | 39 | public string HttpSSLCN = ""; |
40 | public string HttpSSLCertPath = ""; | ||
41 | public string HttpSSLCNCertPass = ""; | ||
40 | public uint httpSSLPort = 9001; | 42 | public uint httpSSLPort = 9001; |
41 | 43 | ||
42 | // "Out of band" managemnt https | 44 | // "Out of band" managemnt https |
@@ -62,6 +64,8 @@ namespace OpenSim.Framework | |||
62 | (uint)config.Configs["Network"].GetInt("http_listener_sslport", ((int)ConfigSettings.DefaultRegionHttpPort+1)); | 64 | (uint)config.Configs["Network"].GetInt("http_listener_sslport", ((int)ConfigSettings.DefaultRegionHttpPort+1)); |
63 | HttpUsesSSL = config.Configs["Network"].GetBoolean("http_listener_ssl", false); | 65 | HttpUsesSSL = config.Configs["Network"].GetBoolean("http_listener_ssl", false); |
64 | HttpSSLCN = config.Configs["Network"].GetString("http_listener_cn", "localhost"); | 66 | HttpSSLCN = config.Configs["Network"].GetString("http_listener_cn", "localhost"); |
67 | HttpSSLCertPath = config.Configs["Network"].GetString("http_listener_cert_path", HttpSSLCertPath); | ||
68 | HttpSSLCNCertPass = config.Configs["Network"].GetString("http_listener_cert_pass", HttpSSLCNCertPass); | ||
65 | 69 | ||
66 | // "Out of band management https" | 70 | // "Out of band management https" |
67 | ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false); | 71 | ssl_listener = config.Configs["Network"].GetBoolean("https_listener",false); |
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 | ||