aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-secure.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2021-02-10 15:28:19 +0900
committerMichael Paquier <michael@paquier.xyz>2021-02-10 15:28:19 +0900
commit092b785fad3de3f81355a4b2420aa39a1bc0ccd5 (patch)
treea9aef301a347f5cae184645dc5877ecf7e86e679 /src/interfaces/libpq/fe-secure.c
parentbd12080980297dbc8ae926a3bd5b2ef9cc47932b (diff)
downloadpostgresql-092b785fad3de3f81355a4b2420aa39a1bc0ccd5.tar.gz
postgresql-092b785fad3de3f81355a4b2420aa39a1bc0ccd5.zip
Simplify code related to compilation of SSL and OpenSSL
This commit makes more generic some comments and code related to the compilation with OpenSSL and SSL in general to ease the addition of more SSL implementations in the future. In libpq, some OpenSSL-only code is moved under USE_OPENSSL and not USE_SSL. While on it, make a comment more consistent in libpq-fe.h. Author: Daniel Gustafsson Discussion: https://postgr.es/m/5382CB4A-9CF3-4145-BA46-C802615935E0@yesql.se
Diffstat (limited to 'src/interfaces/libpq/fe-secure.c')
-rw-r--r--src/interfaces/libpq/fe-secure.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index 00b87bdc96d..c6010718381 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -421,6 +421,13 @@ PQsslAttributeNames(PGconn *conn)
return result;
}
+#endif /* USE_SSL */
+
+/*
+ * Dummy versions of OpenSSL key password hook functions, when built without
+ * OpenSSL.
+ */
+#ifndef USE_OPENSSL
PQsslKeyPassHook_OpenSSL_type
PQgetSSLKeyPassHook_OpenSSL(void)
@@ -439,7 +446,7 @@ PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
{
return 0;
}
-#endif /* USE_SSL */
+#endif /* USE_OPENSSL */
/* Dummy version of GSSAPI information functions, when built without GSS support */
#ifndef ENABLE_GSS