[FIX] Check certificate expired

This commit is contained in:
Gravita 2023-07-25 17:19:21 +07:00
parent 85986c2916
commit 41f00c2310

View file

@ -59,7 +59,7 @@ public static Instant getCertificateExpired(KeyStore keyStore, String keyAlias)
if(x509Certificate.getNotAfter() == null) { if(x509Certificate.getNotAfter() == null) {
continue; continue;
} }
if(date == null || date.before(x509Certificate.getNotAfter())) { if(date == null || date.after(x509Certificate.getNotAfter())) {
date = x509Certificate.getNotAfter(); date = x509Certificate.getNotAfter();
} }
} }