[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Only define X509_get_not{BeforeAfter} if they are not defined



commit d6a773f57d7d91e9a98444b048ed779120f14dfd
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Fri Apr 27 12:55:52 2018 -0400

    Only define X509_get_not{BeforeAfter} if they are not defined
    
    (The originally submitted version of a15b2c57e1f901c531 broke
    with OpenSSL 1.1.0.)
---
 src/common/tortls.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/common/tortls.c b/src/common/tortls.c
index 23bcd8528..cd236363f 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) \



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits