summaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2020-08-26 01:49:47 -0400
committerJay Satiro <raysatiro@yahoo.com>2020-08-26 23:24:41 -0400
commitfbe07c6829ba8c5793c84c2856526e19e9029ab9 (patch)
tree923e7e6ae975b01b8c9bb825d5b350d4afb37f2c /lib/vtls
parentd854572ccc5f524ba48a158c2c26614def9e39e5 (diff)
downloadcurl-fbe07c6829ba8c5793c84c2856526e19e9029ab9.tar.gz
openssl: Fix wincrypt symbols conflict with BoringSSL
OpenSSL undefines the conflicting symbols but BoringSSL does not so we must do it ourselves. Reported-by: Samuel Tranchet Assisted-by: Javier Blazquez Ref: https://bugs.chromium.org/p/boringssl/issues/detail?id=371 Ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_1g/include/openssl/ossl_typ.h#L66-L73 Fixes https://github.com/curl/curl/issues/5669 Closes https://github.com/curl/curl/pull/5857
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/openssl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 4bfd040d3..25b7dfab8 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -34,6 +34,13 @@
/* Wincrypt must be included before anything that could include OpenSSL. */
#if defined(USE_WIN32_CRYPTO)
#include <wincrypt.h>
+/* Undefine wincrypt conflicting symbols for BoringSSL. */
+#undef X509_NAME
+#undef X509_EXTENSIONS
+#undef PKCS7_ISSUER_AND_SERIAL
+#undef PKCS7_SIGNER_INFO
+#undef OCSP_REQUEST
+#undef OCSP_RESPONSE
#endif
#include "urldata.h"