diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-27 12:55:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-27 12:55:52 -0400 |
commit | d6a773f57d7d91e9a98444b048ed779120f14dfd (patch) | |
tree | ee7a2c26a8323fb6565d56b52728aa10b6944cb5 /src/common | |
parent | 32181cbaa2c4f0cdd8d3d39ddafb8aff643a4280 (diff) | |
download | tor-d6a773f57d7d91e9a98444b048ed779120f14dfd.tar.gz tor-d6a773f57d7d91e9a98444b048ed779120f14dfd.zip |
Only define X509_get_not{BeforeAfter} if they are not defined
(The originally submitted version of a15b2c57e1f901c531 broke
with OpenSSL 1.1.0.)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tortls.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index 23bcd85281..cd236363f8 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -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) \ |