Skip to content

Commit 4928197

Browse files
authored
Merge pull request #440 from neheb/n
Switch X509_get_notAfter to get0 variant
2 parents 6a10e99 + 019f473 commit 4928197

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/commands.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,11 @@ parse_cert(const char *name, const char *path)
16591659
BIO_printf(bio_out, "\n");
16601660

16611661
BIO_printf(bio_out, "Valid until: ");
1662+
#if OPENSSL_VERSION_NUMBER < 0x10100000L // < 1.1.0
16621663
ASN1_TIME_print(bio_out, X509_get_notAfter(cert));
1664+
#else
1665+
ASN1_TIME_print(bio_out, X509_get0_notAfter(cert));
1666+
#endif
16631667
BIO_printf(bio_out, "\n");
16641668

16651669
has_san = 0;

0 commit comments

Comments
 (0)