patch headers to avoid redefinitions on windows
This commit is contained in:
parent
b9291face3
commit
0bab46dde2
23
patches/ossl_typ.h.patch
Normal file
23
patches/ossl_typ.h.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- include/openssl/ossl_typ.h.orig 2015-07-06 13:21:18.788571423 -0700
|
||||
+++ include/openssl/ossl_typ.h 2015-07-06 13:24:14.906468003 -0700
|
||||
@@ -100,6 +100,20 @@
|
||||
typedef struct ASN1_ITEM_st ASN1_ITEM;
|
||||
typedef struct asn1_pctx_st ASN1_PCTX;
|
||||
|
||||
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma message("Warning, overriding WinCrypt defines")
|
||||
+#else
|
||||
+#warning overriding WinCrypt defines
|
||||
+#endif
|
||||
+#undef X509_NAME
|
||||
+#undef X509_CERT_PAIR
|
||||
+#undef X509_EXTENSIONS
|
||||
+#undef OCSP_REQUEST
|
||||
+#undef OCSP_RESPONSE
|
||||
+#undef PKCS7_ISSUER_AND_SERIAL
|
||||
+#endif
|
||||
+
|
||||
#ifdef BIGNUM
|
||||
#undef BIGNUM
|
||||
#endif
|
19
patches/pkcs7.h.patch
Normal file
19
patches/pkcs7.h.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- include/openssl/pkcs7.h.orig 2015-07-06 13:26:27.369203527 -0700
|
||||
+++ include/openssl/pkcs7.h 2015-07-06 13:27:37.637051967 -0700
|
||||
@@ -69,6 +69,16 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma message("Warning, overriding WinCrypt defines")
|
||||
+#else
|
||||
+#warning overriding WinCrypt defines
|
||||
+#endif
|
||||
+#undef PKCS7_ISSUER_AND_SERIAL
|
||||
+#undef PKCS7_SIGNER_INFO
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
Encryption_ID DES-CBC
|
||||
Digest_ID MD5
|
20
patches/x509.h.patch
Normal file
20
patches/x509.h.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- include/openssl/x509.h.orig 2015-07-06 13:15:15.059306046 -0700
|
||||
+++ include/openssl/x509.h 2015-07-06 13:16:10.506118278 -0700
|
||||
@@ -112,6 +112,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
|
||||
+#ifdef _MSC_VER
|
||||
+#pragma message("Warning, overriding WinCrypt defines")
|
||||
+#else
|
||||
+#warning overriding WinCrypt defines
|
||||
+#endif
|
||||
+#undef X509_NAME
|
||||
+#undef X509_CERT_PAIR
|
||||
+#undef X509_EXTENSIONS
|
||||
+#endif
|
||||
+
|
||||
#define X509_FILETYPE_PEM 1
|
||||
#define X509_FILETYPE_ASN1 2
|
||||
#define X509_FILETYPE_DEFAULT 3
|
@ -212,6 +212,9 @@ for i in `awk '/SOURCES|HEADERS/ { print $3 }' apps/Makefile.am` ; do
|
||||
fi
|
||||
done
|
||||
patch -p0 < patches/openssl.c.patch
|
||||
patch -p0 < patches/ossl_typ.h.patch
|
||||
patch -p0 < patches/pkcs7.h.patch
|
||||
patch -p0 < patches/x509.h.patch
|
||||
|
||||
# copy libssl source
|
||||
echo "copying libssl source"
|
||||
|
Loading…
x
Reference in New Issue
Block a user