Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt
Date
Msg-id 200904112142.n3BLg0L05026@momjian.us
Whole thread Raw
In response to Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt  (Martin Pitt <mpitt@debian.org>)
Responses Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt  (Magnus Hagander <magnus@hagander.net>)
Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt  (Martin Pitt <mpitt@debian.org>)
List pgsql-bugs
Martin Pitt wrote:
> I do see the benefit of failing to connect to an SSL-enabled server
> *if* I have a root.crt which doesn't match. But why fail if I don't
> have one?

I have digested this thread, and have done two things:  improved the
documentation and posted a patch to make the error message clearer.

In terms of your suggestion about root.crt, I think sslverify != none
should error if it can't verify the server's certificate, whether the
root.crt file is there or not.  If you are asking for sslverify, it
should do that or error, not ignore the setting if there is no root.crt
file.  The only other approach would be to add an sslverify value of
'try' that tries only if root.crt exists.

A separate issue is if sslverify should default to 'cn'.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4757: to_timestamp returns incorrect result
Next
From: Tom Lane
Date:
Subject: Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt