pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: nmset@netcourrier.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: SSL - NonValidatingFactory
Date: Fri, 24 Jul 2009 11:22:32 -0400 (EDT)
Message-ID: <alpine.BSO.2.00.0907241116210.7577@leary.csoft.net> (raw)
In-Reply-To: <mnet1.1248425326.6422.nmset@netcourrier.com>
References: <mnet1.1248425326.6422.nmset@netcourrier.com>



On Fri, 24 Jul 2009, nmset@netcourrier.com wrote:

> I am having problems making SSL connection to PostgreSQL 8.3.7 with the
> jdbc driver, when using the NonValidatingFactory. The server constantly
> rejects the connection saying there is no certificate presented.
>
> There is no problem when NonValidatingFactory is not in use, and a 
> keystore + truststore are used by the usual mechanism (-Djavax.ssl...).
>
> According to the PostgreSQl server documentation, if a root.crt
> cerfificate is present in the data directory of the database cluster,
> the server requires that a client certificate must be verified.
>
> The NonValidatingFactory is supposed to bypass any credentials
> presentation to the server.


The NonValidatingFactory does not verify the information presented by the 
server.  It cannot convince the server to avoid verifying the client 
certificate.  If the server is configured to require a client cert,
it wouldn't make a lot of sense to allow a client to turn off that 
verification.  The documentation was written at a time when we didn't 
think client certificate presentation worked, so it didn't really consider 
that possibility.  So if you really want encryption only and no 
validation, you need to turn off the client certificate requirement on the 
server end.

Kris Jurka



view thread (6+ messages)  latest in thread

Message-ID: <alpine.BSO.2.00.0907241116210.7577@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.0907241116210.7577@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.0907241116210.7577@leary.csoft.net

 · 

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-jdbc@postgresql.org
  Cc: books@ejurka.com, nmset@netcourrier.com
  Subject: Re: SSL - NonValidatingFactory
  In-Reply-To: <alpine.BSO.2.00.0907241116210.7577@leary.csoft.net>
  References: <mnet1.1248425326.6422.nmset@netcourrier.com> <alpine.BSO.2.00.0907241116210.7577@leary.csoft.net>

* 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