aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Base/HttpServerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Base/HttpServerBase.cs33
1 files changed, 21 insertions, 12 deletions
diff --git a/OpenSim/Server/Base/HttpServerBase.cs b/OpenSim/Server/Base/HttpServerBase.cs
index 44ef124..42a8c57 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
@@ -115,21 +116,29 @@ namespace OpenSim.Server.Base
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