aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/HttpServerBase.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Server/Base/HttpServerBase.cs
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Server/Base/HttpServerBase.cs')
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs35
1 files changed, 22 insertions, 13 deletions
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index 44ef124..3357250 100644
--- a/OpenSim/Server/Base/HttpServerBase.cs
+++ b/OpenSim/Server/Base/HttpServerBase.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Server.Base
40{ 40{
41 public class HttpServerBase : ServicesServerBase 41 public class HttpServerBase : ServicesServerBase
42 { 42 {
43// private static readonly ILog m_Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 private uint m_consolePort; 45 private uint m_consolePort;
46 46
@@ -70,6 +70,7 @@ namespace OpenSim.Server.Base
70 70
71 bool ssl_main = networkConfig.GetBoolean("https_main",false); 71 bool ssl_main = networkConfig.GetBoolean("https_main",false);
72 bool ssl_listener = networkConfig.GetBoolean("https_listener",false); 72 bool ssl_listener = networkConfig.GetBoolean("https_listener",false);
73 bool ssl_external = networkConfig.GetBoolean("https_external",false);
73 74
74 m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0); 75 m_consolePort = (uint)networkConfig.GetInt("ConsolePort", 0);
75 76
@@ -111,25 +112,33 @@ namespace OpenSim.Server.Base
111 MainServer.Instance = httpServer; 112 MainServer.Instance = httpServer;
112 113
113 // If https_listener = true, then add an ssl listener on the https_port... 114 // If https_listener = true, then add an ssl listener on the https_port...
114 if (ssl_listener == true) 115 if (ssl_listener == true)
115 { 116 {
116 uint https_port = (uint)networkConfig.GetInt("https_port", 0); 117 uint https_port = (uint)networkConfig.GetInt("https_port", 0);
117 118
118 string cert_path = networkConfig.GetString("cert_path",String.Empty); 119 m_log.WarnFormat("[SSL]: External flag is {0}", ssl_external);
119 if (cert_path == String.Empty) 120 if (!ssl_external)
120 { 121 {
121 System.Console.WriteLine("ERROR: Path to X509 certificate is missing, server can't start."); 122 string cert_path = networkConfig.GetString("cert_path",String.Empty);
122 Environment.Exit(1); 123 if ( cert_path == String.Empty )
124 {
125 System.Console.WriteLine("Path to X509 certificate is missing, server can't start.");
126 Thread.CurrentThread.Abort();
127 }
128 string cert_pass = networkConfig.GetString("cert_pass",String.Empty);
129 if ( cert_pass == String.Empty )
130 {
131 System.Console.WriteLine("Password for X509 certificate is missing, server can't start.");
132 Thread.CurrentThread.Abort();
133 }
134
135 MainServer.AddHttpServer(new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass));
123 } 136 }
124 137 else
125 string cert_pass = networkConfig.GetString("cert_pass",String.Empty);
126 if (cert_pass == String.Empty)
127 { 138 {
128 System.Console.WriteLine("ERROR: Password for X509 certificate is missing, server can't start."); 139 m_log.WarnFormat("[SSL]: SSL port is active but no SSL is used because external SSL was requested.");
129 Environment.Exit(1); 140 MainServer.AddHttpServer(new BaseHttpServer(https_port));
130 } 141 }
131
132 MainServer.AddHttpServer(new BaseHttpServer(https_port, ssl_listener, cert_path, cert_pass));
133 } 142 }
134 } 143 }
135 144