X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FLauncher.java;h=763c21b4464ec893ff05088b82303fb6f6d96281;hb=e1c81f89220249a3fa65a4438d7b4c11aaff17f6;hp=5811be77f5b00dc7a12ab30adcb2c5933b323c3e;hpb=4f97bf32fa55683442e6d80fe9b590ef0054505e;p=gigi.git diff --git a/src/org/cacert/gigi/Launcher.java b/src/org/cacert/gigi/Launcher.java index 5811be77..763c21b4 100644 --- a/src/org/cacert/gigi/Launcher.java +++ b/src/org/cacert/gigi/Launcher.java @@ -69,7 +69,6 @@ public class Launcher { String proto = httpFields.getStringField("X-Real-Proto"); String cert = httpFields.getStringField("X-Client-Cert"); request.setSecure("https".equals(proto)); - System.out.println(request.isSecure()); request.setScheme(proto); if ( !"https".equals(proto)) { cert = null; @@ -152,8 +151,12 @@ public class Launcher { private void initEmails(GigiConfig conf) throws GeneralSecurityException, IOException, KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException { KeyStore privateStore = conf.getPrivateStore(); - Certificate mail = privateStore.getCertificate("mail"); - Key k = privateStore.getKey("mail", conf.getPrivateStorePw().toCharArray()); + Certificate mail = null; + Key k = null; + if (privateStore != null && privateStore.containsAlias("mail")) { + mail = privateStore.getCertificate("mail"); + k = privateStore.getKey("mail", conf.getPrivateStorePw().toCharArray()); + } EmailProvider.initSystem(conf.getMainProps(), mail, k); } @@ -305,7 +308,7 @@ public class Launcher { hw.setHandler(rh); ServletContextHandler servlet = new ServletContextHandler(ServletContextHandler.SESSIONS); - servlet.setInitParameter(SessionManager.__SessionCookieProperty, "CACert-Session"); + servlet.setInitParameter(SessionManager.__SessionCookieProperty, "SomeCA-Session"); servlet.addServlet(webAppServlet, "/*"); ErrorPageErrorHandler epeh = new ErrorPageErrorHandler(); epeh.addErrorPage(404, "/error");