]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/SupportedUser.java
add: enable support to search for certificates
[gigi.git] / src / org / cacert / gigi / dbObjects / SupportedUser.java
index 47c17e83460662e70b15cd1828bcdb81946a4249..a663215a8c658913c0d4991b552de9cc68941c6d 100644 (file)
@@ -47,6 +47,15 @@ public class SupportedUser {
         }
     }
 
+    public void revokeCertificate(Certificate cert) throws GigiApiException {
+
+        // TODO Check for open jobs!
+        if (cert.getStatus() == CertificateStatus.ISSUED) {
+            writeSELog("SE Revoke certificate");
+            cert.revoke().waitFor(60000);
+        }
+    }
+
     private void writeSELog(String type) throws GigiApiException {
         if (ticket == null) {
             throw new GigiApiException("No ticket set!");