]> granicus.if.org Git - postgresql/commit - src/interfaces/libpq/fe-secure.c
Allow full SSL certificate verification (wherein libpq checks its host name
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Jul 2010 17:09:45 +0000 (17:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Jul 2010 17:09:45 +0000 (17:09 +0000)
commitd494e685c580ae149639f4a380157996a7b61f74
tree0835f6f02dddcaa1a88235834b939fc181aa9f58
parent1cc29fe7c60ba643c114979dbe588d3a38005449
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.
doc/src/sgml/libpq.sgml
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/libpq-int.h