]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/Launcher.java
Merge "fix: general cleanup. Remove CipherInfo as it is not compatible with java-11"
[gigi.git] / src / club / wpia / gigi / Launcher.java
index b4ae8e2ae007168cdea9affa4c3fd5e4e0a538a4..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);
     }
@@ -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;
+        }
     }
 
 }