From: Rainer Jung Date: Fri, 16 Mar 2018 11:25:36 +0000 (+0000) Subject: mod_md: Fix compilation with OpenSSL before version 1.0.2. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2783 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea0ad8f0608c649e950da960b58920f9b0ea9a0b;p=thirdparty%2Fapache%2Fhttpd.git 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1826973 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 28c41566f15..4eb0a92c61d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.1 + *) mod_md: Fix compilation with OpenSSL before version 1.0.2. [Rainer Jung] + *) core: Create a conn_config_t structure to hold an extendable core config rather than consuming the whole pointer with the connection socket. [Graham Leggett] diff --git a/modules/md/md_crypt.c b/modules/md/md_crypt.c index 66682eaf4d0..3651256cf03 100644 --- a/modules/md/md_crypt.c +++ b/modules/md/md_crypt.c @@ -190,7 +190,7 @@ static int pem_passwd(char *buf, int size, int rwflag, void *baton) */ 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;