import org.cacert.gigi.pages.LogoutPage;
import org.cacert.gigi.pages.MainPage;
import org.cacert.gigi.pages.Page;
+import org.cacert.gigi.pages.RootCertPage;
import org.cacert.gigi.pages.StaticPage;
import org.cacert.gigi.pages.TestSecure;
import org.cacert.gigi.pages.Verify;
private PingerDaemon pinger;
+ private KeyStore truststore;
+
public Gigi(Properties conf, KeyStore truststore) {
if (instance != null) {
throw new IllegalStateException("Multiple Gigi instances!");
}
instance = this;
DatabaseConnection.init(conf);
+ this.truststore = truststore;
pinger = new PingerDaemon(truststore);
pinger.start();
}
putPage("/error", new PageNotFound(), null);
putPage("/login", new LoginPage("CAcert - Login"), "Join CAcert.org");
putPage("/", new MainPage("CAcert - Home"), null);
+ putPage("/roots", new RootCertPage(truststore), "Join CAcert.org");
putPage(ChangePasswordPage.PATH, new ChangePasswordPage(), "My Account");
putPage(LogoutPage.PATH, new LogoutPage("Logout"), "My Account");
putPage("/secure", new TestSecure(), null);
return instance.reveresePages.get(p).replaceFirst("/?\\*$", "");
}
+ public static void notifyPinger() {
+ instance.pinger.interrupt();
+ }
+
}