crtName = rs.getString(1);
serial = rs.getString(4);
- if (rs.getTime(2) == null) {
+ if (rs.getTimestamp(2) == null) {
return CertificateStatus.DRAFT;
}
- if (rs.getTime(2) != null && rs.getTime(3) == null) {
+ if (rs.getTimestamp(2) != null && rs.getTimestamp(3) == null) {
return CertificateStatus.ISSUED;
}
return CertificateStatus.REVOKED;
public X509Certificate cert() throws IOException, GeneralSecurityException {
CertificateStatus status = getStatus();
- if (status != CertificateStatus.ISSUED) {
+ if (status != CertificateStatus.REVOKED && status != CertificateStatus.ISSUED) {
throw new IllegalStateException(status + " is not wanted here.");
}
InputStream is = null;