mod_md: Fix compilation with OpenSSL before version 1.0.2.
Symbol ASN1_TIME_diff is only available for 1.0.2+,
but luckily alternative code we can use is already
available, originally written for the LibreSSL case.
Submitted by: rjung
Reviewed by: rjung, ylavic, jim
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1828741 13f79535-47bb-0310-9956-
ffa450edef68
*) mod_ssl: Fix merging of proxy SSL context outside <Proxy> sections,
regression introduced in 2.4.30. PR 62232. [Rainer Jung, Yann Ylavic]
+ *) mod_md: Fix compilation with OpenSSL before version 1.0.2. [Rainer Jung]
+
*) mod_remoteip: Restore compatibility with APR 1.4 (apr_sockaddr_is_wildcard).
[Eric Covener]
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_md: Fix compilation with OpenSSL before version 1.0.2.
- Symbol ASN1_TIME_diff is only available for 1.0.2+,
- but luckily alternative code we can use is already
- available, originally written for the LibreSSL case.
- trunk patch: http://svn.apache.org/r1826973
- 2.4.x patch: svn merge -c 1826973 ^/httpd/httpd/trunk .
- +1: rjung, ylavic, jim
-
*) Some easy proposals:
- mod_logio, mod_ssl: Remove pointless static in optional fn pointer
variable declaration
*/
static apr_time_t md_asn1_time_get(const ASN1_TIME* time)
{
-#ifdef LIBRESSL_VERSION_NUMBER
+#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
/* courtesy: https://stackoverflow.com/questions/10975542/asn1-time-to-time-t-conversion#11263731
* all bugs are mine */
apr_time_exp_t t;