From 4d9f9e6a3313155f42d41159e16363455b83b865 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 2 Dec 2018 16:20:10 -0800 Subject: [PATCH] neon: Fix compilation without deprecated OpenSSL APIs Signed-off-by: Rosen Penev --- libs/neon/Makefile | 2 +- .../neon/patches/010-openssl-deprecated.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 libs/neon/patches/010-openssl-deprecated.patch diff --git a/libs/neon/Makefile b/libs/neon/Makefile index 791a895a9..cc9131671 100644 --- a/libs/neon/Makefile +++ b/libs/neon/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=neon PKG_VERSION:=0.30.2 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://web.archive.org/web/20170923042221/http://webdav.org:80/neon/ diff --git a/libs/neon/patches/010-openssl-deprecated.patch b/libs/neon/patches/010-openssl-deprecated.patch new file mode 100644 index 000000000..62aa7f07c --- /dev/null +++ b/libs/neon/patches/010-openssl-deprecated.patch @@ -0,0 +1,37 @@ +--- a/src/ne_openssl.c ++++ b/src/ne_openssl.c +@@ -35,6 +35,10 @@ + #include + #include + #include ++#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#define X509_get0_notBefore X509_get_notBefore ++#define X509_get0_notAfter X509_get_notAfter ++#endif + + #ifdef NE_HAVE_TS_SSL + #include /* for abort() */ +@@ -226,10 +230,10 @@ void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, + time_t *from, time_t *until) + { + if (from) { +- *from = asn1time_to_timet(X509_get_notBefore(cert->subject)); ++ *from = asn1time_to_timet(X509_get0_notBefore(cert->subject)); + } + if (until) { +- *until = asn1time_to_timet(X509_get_notAfter(cert->subject)); ++ *until = asn1time_to_timet(X509_get0_notAfter(cert->subject)); + } + } + +--- a/src/ne_socket.c ++++ b/src/ne_socket.c +@@ -27,7 +27,7 @@ + #include "config.h" + + #include +-#ifdef HAVE_SYS_UIO_h ++#ifdef HAVE_SYS_UIO_H + #include /* writev(2) */ + #endif + #ifdef HAVE_SYS_TIME_H