v02-0002-approach02-rearrange-the-headers.patch

application/octet-stream

Filename: v02-0002-approach02-rearrange-the-headers.patch
Type: application/octet-stream
Part: 0
Message: Re: Windows: openssl & gssapi dislike each other

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
Series: patch v2-0002
File+
src/backend/libpq/be-secure-openssl.c 9 15
src/interfaces/libpq/fe-secure-openssl.c 1 7
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c
index 39b1a66236..1d11e40725 100644
--- a/src/backend/libpq/be-secure-openssl.c
+++ b/src/backend/libpq/be-secure-openssl.c
@@ -27,6 +27,15 @@
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 
+#include <openssl/ssl.h>
+#include <openssl/conf.h>
+#include <openssl/dh.h>
+#ifndef OPENSSL_NO_ECDH
+#include <openssl/ec.h>
+#endif
+#include <openssl/x509v3.h>
+
+#include "common/openssl.h"
 #include "common/string.h"
 #include "libpq/libpq.h"
 #include "miscadmin.h"
@@ -37,21 +46,6 @@
 #include "utils/builtins.h"
 #include "utils/memutils.h"
 
-/*
- * These SSL-related #includes must come after all system-provided headers.
- * This ensures that OpenSSL can take care of conflicts with Windows'
- * <wincrypt.h> by #undef'ing the conflicting macros.  (We don't directly
- * include <wincrypt.h>, but some other Windows headers do.)
- */
-#include "common/openssl.h"
-#include <openssl/conf.h>
-#include <openssl/dh.h>
-#ifndef OPENSSL_NO_ECDH
-#include <openssl/ec.h>
-#endif
-#include <openssl/x509v3.h>
-
-
 /* default init hook can be overridden by a shared library */
 static void default_openssl_tls_init(SSL_CTX *context, bool isServerStart);
 openssl_tls_init_hook_typ openssl_tls_init_hook = default_openssl_tls_init;
diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c
index bf9dfbf918..a938a746a4 100644
--- a/src/interfaces/libpq/fe-secure-openssl.c
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -30,6 +30,7 @@
 #include "fe-auth.h"
 #include "fe-secure-common.h"
 #include "libpq-int.h"
+#include "common/openssl.h"
 
 #ifdef WIN32
 #include "win32.h"
@@ -50,13 +51,6 @@
 #include <pthread.h>
 #endif
 
-/*
- * These SSL-related #includes must come after all system-provided headers.
- * This ensures that OpenSSL can take care of conflicts with Windows'
- * <wincrypt.h> by #undef'ing the conflicting macros.  (We don't directly
- * include <wincrypt.h>, but some other Windows headers do.)
- */
-#include "common/openssl.h"
 #include <openssl/conf.h>
 #ifdef USE_SSL_ENGINE
 #include <openssl/engine.h>