From 20a5ecce0fd7435e875048af2cbabc5cd7f4f98a Mon Sep 17 00:00:00 2001 From: Trevor Bentley Date: Mon, 27 Nov 2017 11:27:11 +0100 Subject: [PATCH] Fix OpenSSL 1.1 build with mingw32/64 --- lib/tests/api.c | 2 +- linux.mk | 11 +---------- tool/openssl-compat.h | 4 +++- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/tests/api.c b/lib/tests/api.c index 7ac783d..7e2cf13 100644 --- a/lib/tests/api.c +++ b/lib/tests/api.c @@ -28,9 +28,9 @@ * */ -#include "../../tool/openssl-compat.h" #include "ykpiv.h" #include "internal.h" +#include "../../tool/openssl-compat.h" #include #include diff --git a/linux.mk b/linux.mk index 3821aa8..3662505 100644 --- a/linux.mk +++ b/linux.mk @@ -42,23 +42,14 @@ doit: tar xfz openssl-$(OPENSSLVERSION).tar.gz && \ cd openssl-$(OPENSSLVERSION) && \ ./Configure linux-x86_64 shared --prefix=$(PWD)/tmp/root $(CFLAGS) && \ - make all install_sw && \ + make all install VERSION="$(OPENSSLVERSION)" && \ cp LICENSE $(PWD)/tmp$(ARCH)/root/licenses/openssl.txt && \ - rm -rf $(PWD)/tmp/root/ssl/ && \ - rm -rf $(PWD)/tmp/root/bin/ && \ - rm -rf $(PWD)/tmp/root/lib/engines/ && \ - rm -rf $(PWD)/tmp/root/lib/libssl* && \ - rm $(PWD)/tmp/root/lib/pkgconfig/libssl.pc && \ - rm $(PWD)/tmp/root/lib/pkgconfig/openssl.pc && \ cd .. && \ cp ../$(PACKAGE)-$(VERSION).tar.gz . && \ tar xfz $(PACKAGE)-$(VERSION).tar.gz && \ cd $(PACKAGE)-$(VERSION)/ && \ CFLAGS=$(CFLAGS) PKG_CONFIG_PATH=$(PWD)/tmp/root/lib/pkgconfig ./configure --prefix=$(PWD)/tmp/root && \ make install $(CHECK) && \ - rm $(PWD)/tmp/root/lib/*.la && \ - rm -rf $(PWD)/tmp/root/lib/pkgconfig && \ - cp COPYING $(PWD)/tmp/root/licenses/$(PACKAGE).txt && \ cd .. && \ cd root && \ zip -r ../../$(PACKAGE)-$(VERSION)-linux-openssl-$(OPENSSLVERSION).zip * diff --git a/tool/openssl-compat.h b/tool/openssl-compat.h index b606f5f..3700bea 100644 --- a/tool/openssl-compat.h +++ b/tool/openssl-compat.h @@ -10,6 +10,8 @@ #ifndef LIBCRYPTO_COMPAT_H #define LIBCRYPTO_COMPAT_H +#ifndef _WINDOWS + #include #if OPENSSL_VERSION_NUMBER < 0x10100000L @@ -30,6 +32,6 @@ void RSA_get0_crt_params(const RSA *r, void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, ASN1_OCTET_STRING **pdigest); +#endif /* _WINDOWS */ #endif /* OPENSSL_VERSION_NUMBER */ #endif /* LIBCRYPTO_COMPAT_H */ -