From ea0ad8f0608c649e950da960b58920f9b0ea9a0b Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Fri, 16 Mar 2018 11:25:36 +0000 Subject: [PATCH] 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 --- CHANGES | 2 ++ modules/md/md_crypt.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 28c41566f1..4eb0a92c61 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 66682eaf4d..3651256cf0 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; -- 2.40.0