]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/Launcher.java
Merge "upd: remove 'browser install'"
[gigi.git] / src / club / wpia / gigi / Launcher.java
index 44b8602c346215e86bd4a17a3d963d1f654056c4..c5e43ce62bce338b5791c3b80d2b13bd29bcbb12 100644 (file)
@@ -58,7 +58,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
 import club.wpia.gigi.api.GigiAPI;
 import club.wpia.gigi.email.EmailProvider;
 import club.wpia.gigi.natives.SetUID;
-import club.wpia.gigi.util.CipherInfo;
+import club.wpia.gigi.ocsp.OCSPResponder;
 import club.wpia.gigi.util.PEM;
 import club.wpia.gigi.util.ServerConstants;
 import club.wpia.gigi.util.ServerConstants.Host;
@@ -272,19 +272,12 @@ public class Launcher {
         private static SslContextFactory generateSSLContextFactory(GigiConfig conf, String alias) throws GeneralSecurityException, IOException {
             SslContextFactory scf = new SslContextFactory() {
 
-                String[] ciphers = null;
-
                 @Override
                 public void customize(SSLEngine sslEngine) {
                     super.customize(sslEngine);
 
                     SSLParameters ssl = sslEngine.getSSLParameters();
                     ssl.setUseCipherSuitesOrder(true);
-                    if (ciphers == null) {
-                        ciphers = CipherInfo.filter(sslEngine.getSupportedCipherSuites());
-                    }
-
-                    ssl.setCipherSuites(ciphers);
                     sslEngine.setSSLParameters(ssl);
 
                 }
@@ -306,7 +299,7 @@ public class Launcher {
     private void initHandlers() throws GeneralSecurityException, IOException {
         HandlerList hl = new HandlerList();
         hl.setHandlers(new Handler[] {
-                ContextLauncher.generateStaticContext(), ContextLauncher.generateGigiContexts(conf.getMainProps(), conf.getTrustStore()), ContextLauncher.generateAPIContext()
+                ContextLauncher.generateStaticContext(), ContextLauncher.generateGigiContexts(conf.getMainProps(), conf.getTrustStore()), ContextLauncher.generateAPIContext(), ContextLauncher.generateOCSPContext()
         });
         s.setHandler(hl);
     }
@@ -338,11 +331,11 @@ public class Launcher {
             final ResourceHandler rh = generateResourceHandler();
             rh.setResourceBase("static/www");
 
-            HandlerWrapper hw = new PolicyRedirector();
+            HandlerWrapper hw = new HandlerWrapper();
             hw.setHandler(rh);
 
             ServletContextHandler servlet = new ServletContextHandler(ServletContextHandler.SESSIONS);
-            servlet.setInitParameter(SessionManager.__SessionCookieProperty, "SomeCA-Session");
+            servlet.setInitParameter(SessionManager.__SessionCookieProperty, ServerConstants.getAppName() + "-Session");
             servlet.addServlet(webAppServlet, "/*");
             ErrorPageErrorHandler epeh = new ErrorPageErrorHandler();
             epeh.addErrorPage(404, "/error");
@@ -395,6 +388,15 @@ public class Launcher {
             return sch;
         }
 
+        protected static Handler generateOCSPContext() {
+            ServletContextHandler sch = new ServletContextHandler();
+
+            sch.addVirtualHosts(new String[] {
+                    ServerConstants.getHostName(Host.OCSP_RESPONDER)
+            });
+            sch.addServlet(new ServletHolder(new OCSPResponder()), "/*");
+            return sch;
+        }
     }
 
 }