return null;
}
+ public java.util.Date getExpiryDate() {
+ if (getStatus() == CertificateStatus.ISSUED) {
+ try (GigiPreparedStatement prep = new GigiPreparedStatement("SELECT expire FROM certs WHERE id=?")) {
+ prep.setInt(1, getId());
+ GigiResultSet res = prep.executeQuery();
+ if (res.next()) {
+ return res.getTimestamp("expire");
+ }
+ }
+ }
+ return null;
+ }
+
public void setLoginEnabled(boolean activate) {
if (activate) {
if ( !isLoginEnabled()) {
return getFingerprint(certx, algorithm);
}
- private static String getFingerprint(X509Certificate cert, String algorithm) throws NoSuchAlgorithmException, CertificateEncodingException {
+ protected static String getFingerprint(X509Certificate cert, String algorithm) throws NoSuchAlgorithmException, CertificateEncodingException {
MessageDigest md = MessageDigest.getInstance(algorithm);
byte[] der = cert.getEncoded();
md.update(der);