aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/hba.c10
-rw-r--r--src/include/libpq/libpq-be.h10
2 files changed, 7 insertions, 13 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 84da823ffab..800dcd99808 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -925,15 +925,13 @@ parse_hba_line(List *line, int line_num, char *raw_line)
return NULL;
#endif
}
-#ifdef USE_SSL
else if (token->string[4] == 'n') /* "hostnossl" */
{
parsedline->conntype = ctHostNoSSL;
}
-#endif
else
{
- /* "host", or "hostnossl" and SSL support not built in */
+ /* "host" */
parsedline->conntype = ctHost;
}
} /* record type */
@@ -1684,7 +1682,6 @@ check_hba(hbaPort *port)
continue;
/* Check SSL state */
-#ifdef USE_SSL
if (port->ssl_in_use)
{
/* Connection is SSL, match both "host" and "hostssl" */
@@ -1697,11 +1694,6 @@ check_hba(hbaPort *port)
if (hba->conntype == ctHostSSL)
continue;
}
-#else
- /* No SSL support, so reject "hostssl" lines */
- if (hba->conntype == ctHostSSL)
- continue;
-#endif
/* Check IP address */
switch (hba->ip_cmp_method)
diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h
index 34e52e44b0c..e81f077f98f 100644
--- a/src/include/libpq/libpq-be.h
+++ b/src/include/libpq/libpq-be.h
@@ -184,14 +184,16 @@ typedef struct Port
#endif
/*
- * SSL structures (keep these last so that the locations of other fields
- * are the same whether or not you build with SSL)
+ * SSL structures.
*/
-#ifdef USE_SSL
bool ssl_in_use;
char *peer_cn;
bool peer_cert_valid;
-#endif
+
+ /*
+ * OpenSSL structures. (Keep these last so that the locations of other
+ * fields are the same whether or not you build with OpenSSL.)
+ */
#ifdef USE_OPENSSL
SSL *ssl;
X509 *peer;