Skip to content

Commit

Permalink
updated -checkend to match openssl
Browse files Browse the repository at this point in the history
  • Loading branch information
ecdeye committed Jul 10, 2024
1 parent 99ba26b commit 80514da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool-openssl/x509.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ bool X509Tool(const args_list_t &args) {
}
ASN1_TIME_free(current_time);

if (days_left < checkend) {
printf("Certificate will expire in less than %d days\n", checkend);
if ((days_left * 86400 + seconds_left) < checkend) {
printf("Certificate will expire\n");
} else {
printf("Certificate is valid for more than %d days\n", checkend);
printf("Certificate will not expire\n");
}
}

Expand Down

0 comments on commit 80514da

Please sign in to comment.