]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: Fix compilation on Windows when ngtcp2 is enabled
authorJavier Blazquez <jblazquez@riotgames.com>
Wed, 24 Jun 2020 20:21:04 +0000 (13:21 -0700)
committerJay Satiro <raysatiro@yahoo.com>
Thu, 25 Jun 2020 07:11:46 +0000 (03:11 -0400)
- 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

lib/vtls/openssl.c

index 790d35862a8d16982658fb5581cffd583538be90..c822e6b099b8a339f301da89b6bb11751dcf852e 100644 (file)
 
 #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 */
 #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>