]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/account/certs/CertificateIssueForm.java
Merge remote-tracking branch 'origin/libs/scrypt/local'
[gigi.git] / src / org / cacert / gigi / pages / account / certs / CertificateIssueForm.java
index 6f099195ee1b780c1771ca02a4a283325350daee..8a3107f0ed5a03bd8ec582d98d9807fc1b6ec29c 100644 (file)
@@ -83,16 +83,18 @@ public class CertificateIssueForm extends Form {
                     if (req.getParameter("CCA") == null) {
                         error.mergeInto(new GigiApiException("You need to accept the CCA."));
                     }
+                    Certificate result = null;
                     try {
                         result = cr.draft();
                     } catch (GigiApiException e) {
                         error.mergeInto(e);
                     }
-                    if ( !error.isEmpty()) {
+                    if ( !error.isEmpty() || result == null) {
                         error.format(out, Page.getLanguage(req));
                         return false;
                     }
                     result.issue(issueDate.getFrom(), issueDate.getTo()).waitFor(60000);
+                    this.result = result;
                     return true;
                 } else {
                     throw new GigiApiException("Error no action.");