import org.cacert.gigi.output.template.IterableDataset;
import org.cacert.gigi.output.template.Template;
import org.cacert.gigi.pages.Page;
+import org.cacert.gigi.util.TimeConditions;
public class MailManagementForm extends Form {
};
vars.put("emails", ds);
+ vars.put("maxMonth", TimeConditions.getInstance().getEmailPingMonths());
t.output(out, l, vars);
}
}
<tr>
<td><?=_Default?></td>
<td><?=_Status?></td>
- <td><?=_Last successful verification?></td>
+ <td><?=_Last successful verification?>*</td>
<td><?=_Address?></td>
<td><?=_Delete?></td>
<td><?=_Request reping?></td>
<td><button class="btn btn-primary" type="submit" name="reping" value="<?=$id?>"><?=_Request reping?></button></td>
</tr>
<? } ?>
+ <tr>
+ <td colspan=6>* <?=_To issue certificates for an email address listed above, the last successful verification of the email address must not be older than ${maxMonth} months. Use "Request Reping" to start a new email verification.?></td>
+ </tr>
</tbody>
</table>
private final int verificationMaxAgeMonths;
+ private final int emailPingMonths;
+
private TimeConditions(Properties ppts) {
testValidMonths = Integer.parseInt(ppts.getProperty("time.testValidMonths", "12"));
reverificationDays = Integer.parseInt(ppts.getProperty("time.reverificationDays", "90"));
verificationFreshMonths = Integer.parseInt(ppts.getProperty("time.verificationFreshMonths", "39"));
verificationMaxAgeMonths = Integer.parseInt(ppts.getProperty("time.verificationMaxAgeMonths", "24"));
+ emailPingMonths = Integer.parseInt(ppts.getProperty("time.emailPingMonths", "6"));
}
public static synchronized TimeConditions getInstance() {
return verificationMaxAgeMonths;
}
+ /**
+ * Maximum time in months that an email address can be used for creating
+ * client certificates before a reping is neccessary
+ *
+ * @return the configured number of months
+ */
+ public int getEmailPingMonths() {
+ return emailPingMonths;
+ }
}
vars.put("reverificationDays", TimeConditions.getInstance().getVerificationLimitDays());
vars.put("verificationFreshMonths", TimeConditions.getInstance().getVerificationMonths());
vars.put("verificationMaxAgeMonths", TimeConditions.getInstance().getVerificationMaxAgeMonths());
+ vars.put("emailPingMonths", TimeConditions.getInstance().getEmailPingMonths());
form.output(resp.getWriter(), getLanguage(req), vars);
}
</td><td>
<?=$verificationMaxAgeMonths?> months
</td></tr>
+
+<tr><td>
+Maximum time before reping of email address needed
+</td><td>
+<?=$emailPingMonths?> months
+</td></tr>
</table>