Skip to content

Commit

Permalink
Only define X509_get_not{BeforeAfter} if they are not defined
Browse files Browse the repository at this point in the history
(The originally submitted version of a15b2c5 broke
with OpenSSL 1.1.0.)
  • Loading branch information
nmathewson committed Apr 27, 2018
1 parent 32181cb commit d6a773f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/tortls.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ ENABLE_GCC_WARNING(redundant-decls)
X509_get0_notBefore(cert)
#define X509_get_notAfter_const(cert) \
X509_get0_notAfter(cert)
#ifndef X509_get_notBefore
#define X509_get_notBefore(cert) \
X509_getm_notBefore(cert)
#endif
#ifndef X509_get_notAfter
#define X509_get_notAfter(cert) \
X509_getm_notAfter(cert)
#else
#endif
#else /* ! OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) */
#define X509_get_notBefore_const(cert) \
((const ASN1_TIME*) X509_get_notBefore((X509 *)cert))
#define X509_get_notAfter_const(cert) \
Expand Down

0 comments on commit d6a773f

Please sign in to comment.