aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-07-14 17:10:03 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-07-14 17:10:03 +0000
commitba1dfcec9624d12f008e4e2d27a40a2d18b8479c (patch)
tree80acc429cbba50e069e081153cf327f1d255ca8d /src/interfaces/libpq/libpq-int.h
parent06e398a50a0a63a1a7cf3b101f680c6c47aaad97 (diff)
downloadpostgresql-ba1dfcec9624d12f008e4e2d27a40a2d18b8479c.tar.gz
postgresql-ba1dfcec9624d12f008e4e2d27a40a2d18b8479c.zip
Allow full SSL certificate verification (wherein libpq checks its host name
parameter against server cert's CN field) to succeed in the case where both host and hostaddr are specified. As with the existing precedents for Kerberos, GSSAPI, SSPI, it is the calling application's responsibility that host and hostaddr match up --- we just use the host name as given. Per bug #5559 from Christopher Head. In passing, make the error handling and messages for the no-host-name-given failure more consistent among these four cases, and correct a lie in the documentation: we don't attempt to reverse-lookup host from hostaddr if host is missing. Back-patch to 8.4 where SSL cert verification was introduced.
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 51b7128b862..bf918e32302 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.143 2009/06/23 18:13:23 mha Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.143.2.1 2010/07/14 17:10:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -283,10 +283,9 @@ struct pg_conn
{
/* Saved values of connection options */
char *pghost; /* the machine on which the server is running */
- char *pghostaddr; /* the IPv4 address of the machine on which
- * the server is running, in IPv4
- * numbers-and-dots notation. Takes precedence
- * over above. */
+ char *pghostaddr; /* the numeric IP address of the machine on
+ * which the server is running. Takes
+ * precedence over above. */
char *pgport; /* the server's communication port */
char *pgunixsocket; /* the Unix-domain socket that the server is
* listening on; if NULL, uses a default