add: revocation state in the result list of support cert search
[gigi.git] / src / club / wpia / gigi / pages / admin / support / FindCertPage.java
index 0d2edbc..ea5ac1e 100644 (file)
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import club.wpia.gigi.dbObjects.Certificate;
+import club.wpia.gigi.dbObjects.Certificate.CertificateStatus;
 import club.wpia.gigi.dbObjects.Certificate.SubjectAlternateName;
 import club.wpia.gigi.localisation.Language;
 import club.wpia.gigi.output.ArrayIterable;
@@ -59,6 +60,12 @@ public class FindCertPage extends Page {
                         vars.put("id", t.getId());
                         vars.put("serial", t.getSerial());
 
+                        if (t.getStatus() == CertificateStatus.REVOKED) {
+                            vars.put("revoked", t.getRevocationDate());
+                        } else {
+                            vars.put("revoked", l.getTranslation("N/A"));
+                        }
+
                         final List<SubjectAlternateName> san = t.getSANs();
                         vars.put("san", new IterableDataset() {