From 6fc9d062441fd6b0e6d1b1ae41efdc3caa7e39c6 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Thu, 13 Jun 2019 09:06:02 +0200
Subject: Use library qualified ifdefs for SSL

The #ifdef guards were using USE_SSL when they in fact were making
sure that OpenSSL specific code wasn't being used. This has never
caused any issues as there only is a single supported TLS backend in
PostgreSQL, but will fail immediately when hacking on a new backend.
---
 src/include/common/sha2.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/include/common/sha2.h b/src/include/common/sha2.h
index 830359f645..cd3da8eccd 100644
--- a/src/include/common/sha2.h
+++ b/src/include/common/sha2.h
@@ -50,7 +50,7 @@
 #ifndef _PG_SHA2_H_
 #define _PG_SHA2_H_
 
-#ifdef USE_SSL
+#ifdef USE_OPENSSL
 #include <openssl/sha.h>
 #endif
 
@@ -69,7 +69,7 @@
 #define PG_SHA512_DIGEST_STRING_LENGTH	(PG_SHA512_DIGEST_LENGTH * 2 + 1)
 
 /* Context Structures for SHA-1/224/256/384/512 */
-#ifdef USE_SSL
+#ifdef USE_OPENSSL
 typedef SHA256_CTX pg_sha256_ctx;
 typedef SHA512_CTX pg_sha512_ctx;
 typedef SHA256_CTX pg_sha224_ctx;
@@ -89,7 +89,7 @@ typedef struct pg_sha512_ctx
 } pg_sha512_ctx;
 typedef struct pg_sha256_ctx pg_sha224_ctx;
 typedef struct pg_sha512_ctx pg_sha384_ctx;
-#endif							/* USE_SSL */
+#endif							/* USE_OPENSSL */
 
 /* Interface routines for SHA224/256/384/512 */
 extern void pg_sha224_init(pg_sha224_ctx *ctx);
-- 
2.14.1.145.gb3622a4ee

