aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2023-11-01 20:45:51 -0500
committerBrent Cook <busterb@gmail.com>2023-11-01 20:45:51 -0500
commite7fe6caab2869a043514c297ce04e6995a65d79f (patch)
tree90a37bbca2f051706c11f8c72d424b0faa21172d
parentc22956810cb5877e3981a263c0be538370f49672 (diff)
parenteed367e19c930472bc2d1c8026c1109afeea78d4 (diff)
downloadportable-e7fe6caab2869a043514c297ce04e6995a65d79f.tar.gz
portable-e7fe6caab2869a043514c297ce04e6995a65d79f.tar.bz2
portable-e7fe6caab2869a043514c297ce04e6995a65d79f.zip
Land #924, allow disabling WINCRYPT warnings
-rw-r--r--patches/windows_headers.patch32
1 files changed, 15 insertions, 17 deletions
diff --git a/patches/windows_headers.patch b/patches/windows_headers.patch
index 087d5ab..6eafa49 100644
--- a/patches/windows_headers.patch
+++ b/patches/windows_headers.patch
@@ -1,26 +1,25 @@
1diff -u include/openssl.orig/dtls1.h include/openssl/dtls1.h 1--- include/openssl/dtls1.h.orig Wed Nov 1 13:15:36 2023
2--- include/openssl.orig/dtls1.h Mon Dec 7 07:58:32 2015 2+++ include/openssl/dtls1.h Wed Nov 1 13:15:54 2023
3+++ include/openssl/dtls1.h Mon Dec 7 07:56:14 2015
4@@ -60,7 +60,11 @@ 3@@ -60,7 +60,11 @@
5 #ifndef HEADER_DTLS1_H 4 #ifndef HEADER_DTLS1_H
6 #define HEADER_DTLS1_H 5 #define HEADER_DTLS1_H
7 6
8+#if defined(_WIN32) 7+#if defined(_WIN32)
9+#include <winsock2.h> 8+#include <winsock2.h>
10+#else 9+#else
11 #include <sys/time.h> 10 #include <sys/time.h>
12+#endif 11+#endif
13 12
14 #include <stdio.h> 13 #include <stdio.h>
15 #include <stdlib.h> 14 #include <stdlib.h>
16--- include/openssl/ossl_typ.h.orig Fri Feb 18 16:30:39 2022 15--- include/openssl/ossl_typ.h.orig Wed Nov 1 13:15:36 2023
17+++ include/openssl/ossl_typ.h Mon Feb 21 05:39:35 2022 16+++ include/openssl/ossl_typ.h Wed Nov 1 13:18:23 2023
18@@ -82,6 +82,22 @@ 17@@ -82,6 +82,22 @@ typedef struct asn1_object_st ASN1_OBJECT;
19 typedef struct ASN1_ITEM_st ASN1_ITEM; 18 typedef struct ASN1_ITEM_st ASN1_ITEM;
20 typedef struct asn1_pctx_st ASN1_PCTX; 19 typedef struct asn1_pctx_st ASN1_PCTX;
21 20
22+#if defined(_WIN32) && defined(__WINCRYPT_H__) 21+#if defined(_WIN32) && defined(__WINCRYPT_H__)
23+#ifndef LIBRESSL_INTERNAL 22+#if !defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_DISABLE_OVERRIDE_WINCRYPT_DEFINES_WARNING)
24+#ifdef _MSC_VER 23+#ifdef _MSC_VER
25+#pragma message("Warning, overriding WinCrypt defines") 24+#pragma message("Warning, overriding WinCrypt defines")
26+#else 25+#else
@@ -38,15 +37,14 @@ diff -u include/openssl.orig/dtls1.h include/openssl/dtls1.h
38 #ifdef BIGNUM 37 #ifdef BIGNUM
39 #undef BIGNUM 38 #undef BIGNUM
40 #endif 39 #endif
41diff -u include/openssl.orig/pkcs7.h include/openssl/pkcs7.h 40--- include/openssl/pkcs7.h.orig Wed Nov 1 13:15:36 2023
42--- include/openssl.orig/pkcs7.h Mon Dec 7 07:58:32 2015 41+++ include/openssl/pkcs7.h Wed Nov 1 13:17:58 2023
43+++ include/openssl/pkcs7.h Mon Dec 7 07:56:14 2015
44@@ -69,6 +69,18 @@ 42@@ -69,6 +69,18 @@
45 extern "C" { 43 extern "C" {
46 #endif 44 #endif
47 45
48+#if defined(_WIN32) && defined(__WINCRYPT_H__) 46+#if defined(_WIN32) && defined(__WINCRYPT_H__)
49+#ifndef LIBRESSL_INTERNAL 47+#if !defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_DISABLE_OVERRIDE_WINCRYPT_DEFINES_WARNING)
50+#ifdef _MSC_VER 48+#ifdef _MSC_VER
51+#pragma message("Warning, overriding WinCrypt defines") 49+#pragma message("Warning, overriding WinCrypt defines")
52+#else 50+#else
@@ -60,14 +58,14 @@ diff -u include/openssl.orig/pkcs7.h include/openssl/pkcs7.h
60 /* 58 /*
61 Encryption_ID DES-CBC 59 Encryption_ID DES-CBC
62 Digest_ID MD5 60 Digest_ID MD5
63--- include/openssl/x509.h.orig Thu Aug 3 13:35:00 2023 61--- include/openssl/x509.h.orig Wed Nov 1 13:15:36 2023
64+++ include/openssl/x509.h Thu Aug 3 13:35:18 2023 62+++ include/openssl/x509.h Wed Nov 1 13:18:44 2023
65@@ -100,6 +100,19 @@ 63@@ -100,6 +100,19 @@
66 extern "C" { 64 extern "C" {
67 #endif 65 #endif
68 66
69+#if defined(_WIN32) && defined(__WINCRYPT_H__) 67+#if defined(_WIN32) && defined(__WINCRYPT_H__)
70+#ifndef LIBRESSL_INTERNAL 68+#if !defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_DISABLE_OVERRIDE_WINCRYPT_DEFINES_WARNING)
71+#ifdef _MSC_VER 69+#ifdef _MSC_VER
72+#pragma message("Warning, overriding WinCrypt defines") 70+#pragma message("Warning, overriding WinCrypt defines")
73+#else 71+#else