pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christopher Head <chris2k01@hotmail.com>
Cc: pgsql-bugs@postgresql.org
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: BUG #5559: Full SSL verification fails when hostaddr provided
Date: Tue, 13 Jul 2010 18:09:27 -0400
Message-ID: <18252.1279058967@sss.pgh.pa.us> (raw)
In-Reply-To: <201007130825.o6D8Pepl005798@wwwmaster.postgresql.org>
References: <201007130825.o6D8Pepl005798@wwwmaster.postgresql.org>

"Christopher Head" <chris2k01@hotmail.com> writes:
> When establishing a connection to a PostgreSQL server using a connection
> string, there are two parameters that can be provided to specify where to
> connect to: "host" and "hostaddr". If both are provided, the documentation
> states that "hostaddr" is used to actually establish the socket (thus
> avoiding
> a potentially-expensive DNS lookup), while "host" is used for doing some
> Kerberos stuff.

> It makes sense that in the case of an SSL connection with
> "sslmode=verify-full" (check that the server's certificate is signed by a
> trusted CA and has the
> correct hostname), if both parameters are provided, that "host" also be used
> for certificate checking. Unfortunately, as per line 536 of the file
> fe-secure.c in the PostgreSQL sources, if hostaddr is specified, SSL full
> verification just plain fails without trying at all. I suspect this line
> should be "if (!conn->pghost)" instead of "if (conn->pghostaddr)".

That's really a definitional change, but it seems like a reasonable one
to me.  Magnus, what do you think?

			regards, tom lane



view thread (26+ messages)  latest in thread

Message-ID: <18252.1279058967@sss.pgh.pa.us>
Permalink:  ../18252.1279058967@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18252.1279058967@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, chris2k01@hotmail.com, magnus@hagander.net
  Subject: Re: BUG #5559: Full SSL verification fails when hostaddr provided
  In-Reply-To: <18252.1279058967@sss.pgh.pa.us>
  References: <201007130825.o6D8Pepl005798@wwwmaster.postgresql.org> <18252.1279058967@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox