diff options
-rwxr-xr-x | dist-win.sh | 11 | ||||
-rw-r--r-- | patches/opensslconf.h.patch | 13 | ||||
-rw-r--r-- | patches/ossl_typ.h.patch | 25 | ||||
-rw-r--r-- | patches/pkcs7.h.patch | 21 | ||||
-rw-r--r-- | patches/windows_headers.patch | 100 | ||||
-rw-r--r-- | patches/x509.h.patch | 22 | ||||
-rwxr-xr-x | update.sh | 2 |
7 files changed, 102 insertions, 92 deletions
diff --git a/dist-win.sh b/dist-win.sh index cfb6414..88836a5 100755 --- a/dist-win.sh +++ b/dist-win.sh | |||
@@ -29,20 +29,11 @@ for ARCH in X86 X64; do | |||
29 | make -j 4 install DESTDIR=`pwd`/stage-$ARCHDIR | 29 | make -j 4 install DESTDIR=`pwd`/stage-$ARCHDIR |
30 | 30 | ||
31 | mkdir -p $DIST/$ARCHDIR | 31 | mkdir -p $DIST/$ARCHDIR |
32 | #cp -a stage-$ARCHDIR/usr/local/lib/* $DIST/$ARCHDIR | ||
33 | if [ ! -e $DIST/include ]; then | 32 | if [ ! -e $DIST/include ]; then |
34 | cp -a stage-$ARCHDIR/usr/local/include $DIST | 33 | cp -r stage-$ARCHDIR/usr/local/include $DIST |
35 | sed -i -e 'N;/\n.*__non/s/"\? *\n/ /;P;D' \ | ||
36 | $DIST/include/openssl/*.h $DIST/include/*.h | ||
37 | sed -i -e 'N;/\n.*__attr/s/"\? *\n/ /;P;D' \ | ||
38 | $DIST/include/openssl/*.h $DIST/include/*.h | ||
39 | sed -i -e "s/__attr.*;/;/" \ | ||
40 | -e "s/sys\/time.h/winsock2.h/" \ | ||
41 | $DIST/include/openssl/*.h $DIST/include/*.h | ||
42 | fi | 34 | fi |
43 | 35 | ||
44 | cp stage-$ARCHDIR/usr/local/bin/* $DIST/$ARCHDIR | 36 | cp stage-$ARCHDIR/usr/local/bin/* $DIST/$ARCHDIR |
45 | #cp /usr/$HOST/sys-root/mingw/bin/libssp* $DIST/$ARCHDIR | ||
46 | 37 | ||
47 | for i in libcrypto libssl libtls; do | 38 | for i in libcrypto libssl libtls; do |
48 | DLL=$(basename `ls -1 $DIST/$ARCHDIR/$i*.dll`|cut -d. -f1) | 39 | DLL=$(basename `ls -1 $DIST/$ARCHDIR/$i*.dll`|cut -d. -f1) |
diff --git a/patches/opensslconf.h.patch b/patches/opensslconf.h.patch deleted file mode 100644 index 0507c92..0000000 --- a/patches/opensslconf.h.patch +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | --- include/openssl/opensslconf.h.orig 2015-07-19 23:21:47.000000000 -0600 | ||
2 | +++ include/openssl/opensslconf.h 2015-07-19 23:21:17.000000000 -0600 | ||
3 | @@ -1,6 +1,10 @@ | ||
4 | #include <openssl/opensslfeatures.h> | ||
5 | /* crypto/opensslconf.h.in */ | ||
6 | |||
7 | +#if defined(_MSC_VER) && !defined(__attribute__) | ||
8 | +#define __attribute__(a) | ||
9 | +#endif | ||
10 | + | ||
11 | /* Generate 80386 code? */ | ||
12 | #undef I386_ONLY | ||
13 | |||
diff --git a/patches/ossl_typ.h.patch b/patches/ossl_typ.h.patch deleted file mode 100644 index f213347..0000000 --- a/patches/ossl_typ.h.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | --- include/openssl/ossl_typ.h.orig 2015-07-06 13:21:18.788571423 -0700 | ||
2 | +++ include/openssl/ossl_typ.h 2015-07-06 13:24:14.906468003 -0700 | ||
3 | @@ -100,6 +100,22 @@ | ||
4 | typedef struct ASN1_ITEM_st ASN1_ITEM; | ||
5 | typedef struct asn1_pctx_st ASN1_PCTX; | ||
6 | |||
7 | +#if defined(_WIN32) && defined(__WINCRYPT_H__) | ||
8 | +#ifndef LIBRESSL_INTERNAL | ||
9 | +#ifdef _MSC_VER | ||
10 | +#pragma message("Warning, overriding WinCrypt defines") | ||
11 | +#else | ||
12 | +#warning overriding WinCrypt defines | ||
13 | +#endif | ||
14 | +#endif | ||
15 | +#undef X509_NAME | ||
16 | +#undef X509_CERT_PAIR | ||
17 | +#undef X509_EXTENSIONS | ||
18 | +#undef OCSP_REQUEST | ||
19 | +#undef OCSP_RESPONSE | ||
20 | +#undef PKCS7_ISSUER_AND_SERIAL | ||
21 | +#endif | ||
22 | + | ||
23 | #ifdef BIGNUM | ||
24 | #undef BIGNUM | ||
25 | #endif | ||
diff --git a/patches/pkcs7.h.patch b/patches/pkcs7.h.patch deleted file mode 100644 index 4c6f6ba..0000000 --- a/patches/pkcs7.h.patch +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | --- include/openssl/pkcs7.h.orig 2015-07-06 13:26:27.369203527 -0700 | ||
2 | +++ include/openssl/pkcs7.h 2015-07-06 13:27:37.637051967 -0700 | ||
3 | @@ -69,6 +69,18 @@ | ||
4 | extern "C" { | ||
5 | #endif | ||
6 | |||
7 | +#if defined(_WIN32) && defined(__WINCRYPT_H__) | ||
8 | +#ifndef LIBRESSL_INTERNAL | ||
9 | +#ifdef _MSC_VER | ||
10 | +#pragma message("Warning, overriding WinCrypt defines") | ||
11 | +#else | ||
12 | +#warning overriding WinCrypt defines | ||
13 | +#endif | ||
14 | +#endif | ||
15 | +#undef PKCS7_ISSUER_AND_SERIAL | ||
16 | +#undef PKCS7_SIGNER_INFO | ||
17 | +#endif | ||
18 | + | ||
19 | /* | ||
20 | Encryption_ID DES-CBC | ||
21 | Digest_ID MD5 | ||
diff --git a/patches/windows_headers.patch b/patches/windows_headers.patch new file mode 100644 index 0000000..f6b799c --- /dev/null +++ b/patches/windows_headers.patch | |||
@@ -0,0 +1,100 @@ | |||
1 | diff -urN include/openssl.orig/dtls1.h include/openssl/dtls1.h | ||
2 | --- include/openssl.orig/dtls1.h Mon Sep 21 21:45:45 2015 | ||
3 | +++ include/openssl/dtls1.h Mon Sep 21 21:58:56 2015 | ||
4 | @@ -60,7 +60,11 @@ | ||
5 | #ifndef HEADER_DTLS1_H | ||
6 | #define HEADER_DTLS1_H | ||
7 | |||
8 | +#if defined(_WIN32) | ||
9 | +#include <winsock2.h> | ||
10 | +#else | ||
11 | #include <sys/time.h> | ||
12 | +#endif | ||
13 | |||
14 | #include <stdio.h> | ||
15 | #include <stdlib.h> | ||
16 | diff -urN include/openssl.orig/opensslconf.h include/openssl/opensslconf.h | ||
17 | --- include/openssl.orig/opensslconf.h Mon Sep 21 21:45:45 2015 | ||
18 | +++ include/openssl/opensslconf.h Mon Sep 21 21:56:13 2015 | ||
19 | @@ -1,6 +1,10 @@ | ||
20 | #include <openssl/opensslfeatures.h> | ||
21 | /* crypto/opensslconf.h.in */ | ||
22 | |||
23 | +#if defined(_MSC_VER) && !defined(__attribute__) | ||
24 | +#define __attribute__(a) | ||
25 | +#endif | ||
26 | + | ||
27 | /* Generate 80386 code? */ | ||
28 | #undef I386_ONLY | ||
29 | |||
30 | diff -urN include/openssl.orig/ossl_typ.h include/openssl/ossl_typ.h | ||
31 | --- include/openssl.orig/ossl_typ.h Mon Sep 21 21:45:45 2015 | ||
32 | +++ include/openssl/ossl_typ.h Mon Sep 21 21:56:22 2015 | ||
33 | @@ -100,6 +100,22 @@ | ||
34 | typedef struct ASN1_ITEM_st ASN1_ITEM; | ||
35 | typedef struct asn1_pctx_st ASN1_PCTX; | ||
36 | |||
37 | +#if defined(_WIN32) && defined(__WINCRYPT_H__) | ||
38 | +#ifndef LIBRESSL_INTERNAL | ||
39 | +#ifdef _MSC_VER | ||
40 | +#pragma message("Warning, overriding WinCrypt defines") | ||
41 | +#else | ||
42 | +#warning overriding WinCrypt defines | ||
43 | +#endif | ||
44 | +#endif | ||
45 | +#undef X509_NAME | ||
46 | +#undef X509_CERT_PAIR | ||
47 | +#undef X509_EXTENSIONS | ||
48 | +#undef OCSP_REQUEST | ||
49 | +#undef OCSP_RESPONSE | ||
50 | +#undef PKCS7_ISSUER_AND_SERIAL | ||
51 | +#endif | ||
52 | + | ||
53 | #ifdef BIGNUM | ||
54 | #undef BIGNUM | ||
55 | #endif | ||
56 | diff -urN include/openssl.orig/pkcs7.h include/openssl/pkcs7.h | ||
57 | --- include/openssl.orig/pkcs7.h Mon Sep 21 21:45:45 2015 | ||
58 | +++ include/openssl/pkcs7.h Mon Sep 21 21:56:29 2015 | ||
59 | @@ -69,6 +69,18 @@ | ||
60 | extern "C" { | ||
61 | #endif | ||
62 | |||
63 | +#if defined(_WIN32) && defined(__WINCRYPT_H__) | ||
64 | +#ifndef LIBRESSL_INTERNAL | ||
65 | +#ifdef _MSC_VER | ||
66 | +#pragma message("Warning, overriding WinCrypt defines") | ||
67 | +#else | ||
68 | +#warning overriding WinCrypt defines | ||
69 | +#endif | ||
70 | +#endif | ||
71 | +#undef PKCS7_ISSUER_AND_SERIAL | ||
72 | +#undef PKCS7_SIGNER_INFO | ||
73 | +#endif | ||
74 | + | ||
75 | /* | ||
76 | Encryption_ID DES-CBC | ||
77 | Digest_ID MD5 | ||
78 | diff -urN include/openssl.orig/x509.h include/openssl/x509.h | ||
79 | --- include/openssl.orig/x509.h Mon Sep 21 21:45:45 2015 | ||
80 | +++ include/openssl/x509.h Mon Sep 21 21:56:35 2015 | ||
81 | @@ -112,6 +112,19 @@ | ||
82 | extern "C" { | ||
83 | #endif | ||
84 | |||
85 | +#if defined(_WIN32) | ||
86 | +#ifndef LIBRESSL_INTERNAL | ||
87 | +#ifdef _MSC_VER | ||
88 | +#pragma message("Warning, overriding WinCrypt defines") | ||
89 | +#else | ||
90 | +#warning overriding WinCrypt defines | ||
91 | +#endif | ||
92 | +#endif | ||
93 | +#undef X509_NAME | ||
94 | +#undef X509_CERT_PAIR | ||
95 | +#undef X509_EXTENSIONS | ||
96 | +#endif | ||
97 | + | ||
98 | #define X509_FILETYPE_PEM 1 | ||
99 | #define X509_FILETYPE_ASN1 2 | ||
100 | #define X509_FILETYPE_DEFAULT 3 | ||
diff --git a/patches/x509.h.patch b/patches/x509.h.patch deleted file mode 100644 index f0e59b2..0000000 --- a/patches/x509.h.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | --- include/openssl/x509.h.orig 2015-07-06 13:15:15.059306046 -0700 | ||
2 | +++ include/openssl/x509.h 2015-07-06 13:16:10.506118278 -0700 | ||
3 | @@ -112,6 +112,19 @@ | ||
4 | extern "C" { | ||
5 | #endif | ||
6 | |||
7 | +#if defined(_WIN32) | ||
8 | +#ifndef LIBRESSL_INTERNAL | ||
9 | +#ifdef _MSC_VER | ||
10 | +#pragma message("Warning, overriding WinCrypt defines") | ||
11 | +#else | ||
12 | +#warning overriding WinCrypt defines | ||
13 | +#endif | ||
14 | +#endif | ||
15 | +#undef X509_NAME | ||
16 | +#undef X509_CERT_PAIR | ||
17 | +#undef X509_EXTENSIONS | ||
18 | +#endif | ||
19 | + | ||
20 | #define X509_FILETYPE_PEM 1 | ||
21 | #define X509_FILETYPE_ASN1 2 | ||
22 | #define X509_FILETYPE_DEFAULT 3 | ||
@@ -300,7 +300,7 @@ add_man_links() { | |||
300 | done | 300 | done |
301 | } | 301 | } |
302 | 302 | ||
303 | # apply local patches (Windows support) | 303 | # apply local patches |
304 | for i in patches/*.patch; do | 304 | for i in patches/*.patch; do |
305 | patch -p0 < $i | 305 | patch -p0 < $i |
306 | done | 306 | done |