aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorUbitUmarov2016-10-06 21:35:11 +0100
committerUbitUmarov2016-10-06 21:35:11 +0100
commitb51739e23ecc071a107755c7613ff274f65c3a64 (patch)
treef86af87ea451271a06acc62e769e97ea33cd9bd9 /OpenSim/Framework
parentMerge branch 'master' into httptests (diff)
downloadopensim-SC-b51739e23ecc071a107755c7613ff274f65c3a64.zip
opensim-SC-b51739e23ecc071a107755c7613ff274f65c3a64.tar.gz
opensim-SC-b51739e23ecc071a107755c7613ff274f65c3a64.tar.bz2
opensim-SC-b51739e23ecc071a107755c7613ff274f65c3a64.tar.xz
recover regions main http server ssl suport. Using a PKCS12 cert file, and not certs store for now. Option http_listener_cn, cert CN need to the same as external IP. Self sign certs do seem to work, but the viewers option NoVerifySLLCert needs to be set true. CA check is not done but they do check the IP
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/NetworkServersInfo.cs4
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs10
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