kb.setValidityInterval(notBefore, notAfter);
}
private void addStatus(boolean valid, KeyBinding kb) {
Status status = new Status();
status
.setStatusValue((valid) ? StatusValue.VALID
: StatusValue.INVALID);
if (valid) {
status.addValidReason(ValidReason.ISSUER_TRUST);
status.addValidReason(ValidReason.REVOCATION_STATUS);
status.addValidReason(ValidReason.SIGNATURE);
status.addValidReason(ValidReason.VALIDITY_INTERVAL);
} else {
status.addInvalidReason(InvalidReason.ISSUER_TRUST);
status.addInvalidReason(InvalidReason.REVOCATION_STATUS);
status.addInvalidReason(InvalidReason.SIGNATURE);
status.addInvalidReason(InvalidReason.VALIDITY_INTERVAL);
}
kb.setStatus(status);
}