summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Blazquez <jblazquez@riotgames.com>2020-06-24 13:21:04 -0700
committerJay Satiro <raysatiro@yahoo.com>2020-06-25 03:11:46 -0400
commitae3d1e04f68b0f3ef5a19118553cd630f8454a3b (patch)
tree6cbe1fd7c048d9c3fa7ea6f07500c776fe24439a
parent79d8099ff0f826e213846af78436048d06cd48db (diff)
downloadgnurl-ae3d1e04f68b0f3ef5a19118553cd630f8454a3b.tar.gz
gnurl-ae3d1e04f68b0f3ef5a19118553cd630f8454a3b.tar.bz2
gnurl-ae3d1e04f68b0f3ef5a19118553cd630f8454a3b.zip
openssl: Fix compilation on Windows when ngtcp2 is enabled
- Include wincrypt before OpenSSL includes so that the latter can properly handle any conflicts between the two. Closes https://github.com/curl/curl/pull/5606
-rw-r--r--lib/vtls/openssl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 790d35862..c822e6b09 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -31,6 +31,11 @@
#include <limits.h>
+/* Wincrypt must be included before anything that could include OpenSSL. */
+#if defined(USE_WIN32_CRYPTO)
+#include <wincrypt.h>
+#endif
+
#include "urldata.h"
#include "sendf.h"
#include "formdata.h" /* for the boundary function */
@@ -48,10 +53,6 @@
#include "strerror.h"
#include "curl_printf.h"
-#if defined(USE_WIN32_CRYPTO)
-#include <wincrypt.h>
-#endif
-
#include <openssl/ssl.h>
#include <openssl/rand.h>
#include <openssl/x509v3.h>