+ public static Job sign(Certificate targetId, Date start, String period) throws SQLException, GigiApiException {
+ CertificateValiditySelector.checkValidityLength(period);
+ PreparedStatement ps = DatabaseConnection.getInstance().prepare("INSERT INTO `jobs` SET targetId=?, task=?, executeFrom=?, executeTo=?");
+ ps.setInt(1, targetId.getId());
+ ps.setString(2, JobType.SIGN.getName());
+ ps.setDate(3, start);
+ ps.setString(4, period);
+ ps.execute();
+ return new Job(DatabaseConnection.lastInsertId(ps));
+ }
+
+ public static Job revoke(Certificate targetId) throws SQLException {
+