forked from libressl/portable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows_headers.patch
80 lines (75 loc) · 2.08 KB
/
windows_headers.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
--- include/openssl/dtls1.h.orig Wed Nov 1 13:15:36 2023
+++ include/openssl/dtls1.h Wed Nov 1 13:15:54 2023
@@ -60,7 +60,11 @@
#ifndef HEADER_DTLS1_H
#define HEADER_DTLS1_H
+#if defined(_WIN32)
+#include <winsock2.h>
+#else
#include <sys/time.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
--- include/openssl/ossl_typ.h.orig Wed Nov 1 13:15:36 2023
+++ include/openssl/ossl_typ.h Wed Nov 1 13:18:23 2023
@@ -82,6 +82,21 @@ typedef struct asn1_object_st ASN1_OBJECT;
typedef struct ASN1_ITEM_st ASN1_ITEM;
typedef struct asn1_pctx_st ASN1_PCTX;
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
+#if !defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_DISABLE_OVERRIDE_WINCRYPT_DEFINES_WARNING)
+#ifdef _MSC_VER
+#pragma message("Warning, overriding WinCrypt defines")
+#else
+#warning overriding WinCrypt defines
+#endif
+#endif
+#undef X509_NAME
+#undef X509_EXTENSIONS
+#undef OCSP_REQUEST
+#undef OCSP_RESPONSE
+#undef PKCS7_ISSUER_AND_SERIAL
+#endif
+
#ifdef BIGNUM
#undef BIGNUM
#endif
--- include/openssl/pkcs7.h.orig Wed Nov 1 13:15:36 2023
+++ include/openssl/pkcs7.h Wed Nov 1 13:17:58 2023
@@ -69,6 +69,18 @@
extern "C" {
#endif
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
+#if !defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_DISABLE_OVERRIDE_WINCRYPT_DEFINES_WARNING)
+#ifdef _MSC_VER
+#pragma message("Warning, overriding WinCrypt defines")
+#else
+#warning overriding WinCrypt defines
+#endif
+#endif
+#undef PKCS7_ISSUER_AND_SERIAL
+#undef PKCS7_SIGNER_INFO
+#endif
+
/*
Encryption_ID DES-CBC
Digest_ID MD5
--- include/openssl/x509.h.orig Wed Nov 1 13:15:36 2023
+++ include/openssl/x509.h Wed Nov 1 13:18:44 2023
@@ -100,6 +100,18 @@
extern "C" {
#endif
+#if defined(_WIN32) && defined(__WINCRYPT_H__)
+#if !defined(LIBRESSL_INTERNAL) && !defined(LIBRESSL_DISABLE_OVERRIDE_WINCRYPT_DEFINES_WARNING)
+#ifdef _MSC_VER
+#pragma message("Warning, overriding WinCrypt defines")
+#else
+#warning overriding WinCrypt defines
+#endif
+#endif
+#undef X509_NAME
+#undef X509_EXTENSIONS
+#endif
+
#define X509_FILETYPE_PEM 1
#define X509_FILETYPE_ASN1 2
#define X509_FILETYPE_DEFAULT 3