]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/Domain.java
ADD: simple pinger daemon.
[gigi.git] / src / org / cacert / gigi / Domain.java
index 89a3d2b6a021c6cd2e38865184aa5950ee3d8112..3eb628aacb0b8f1d47bd07cc56faa05a9289f219 100644 (file)
@@ -115,4 +115,15 @@ public class Domain {
             throw new GigiApiException(e);
         }
     }
+
+    public void verify(String hash) throws GigiApiException {
+        try {
+            PreparedStatement ps = DatabaseConnection.getInstance().prepare("UPDATE domainPinglog SET state='success' WHERE challenge=? AND configId IN (SELECT id FROM pingconfig WHERE domainId=?)");
+            ps.setString(1, hash);
+            ps.setInt(2, id);
+            ps.executeUpdate();
+        } catch (SQLException e) {
+            throw new GigiApiException(e);
+        }
+    }
 }