+ String csr = req.getParameter("optionalCSR");
+ if (!"on".equals(req.getParameter("CCA"))) {
+ // Error.
+ return;
+ }
+ Certificate c = new Certificate("/commonName=felix@dogcraft.de",
+ "sha256", csr);
+ c.issue();
+ try {
+ c.waitFor(60000);
+ out.println(c.getStatus());
+ out.println(c.cert());
+ } catch (SQLException e1) {
+ e1.printStackTrace();
+ } catch (GeneralSecurityException e) {
+ e.printStackTrace();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }