JDBC with SSL - Mailing list pgsql-jdbc

From Walter Hurry
Subject JDBC with SSL
Date
Msg-id jbg7qf$9mn$1@dough.gmane.org
Whole thread Raw
Responses Re: JDBC with SSL
List pgsql-jdbc
First of all, I am sorry if this is the wrong place to ask. If it is,
perhaps someone could direct me to the right arena.

This is PostgreSQL 9.0.1 with PostgreSQL JDBC 9.1.901.

I have successfully set up one of my databases to require SSL connections
with a certificate, and installed a certificate into $HOME/.postgresql.
That directory contains postgresql.crt,  postgresql.key and root.crt.

I can connect successfully using psql and libpq applications. The
connection is also rejected properly if I move the certificate out of the
way.

Now I am trying to connect using JDBC and SSL from a Java application
(JDBC is fine without SSL on another database). However, I am getting the
following error:

FATAL: connection requires a valid client certificate

So it appears that somehow I need to "tell" Java where to find the client
certificate. Any pointers as to how I do this please?

By the way, since this is a self-signed certificate I have followed the
instructions at <http://jdbc.postgresql.org/documentation/81/ssl-
client.html>. These succeeded, but I am still getting the error.

Thanks,
Walter




pgsql-jdbc by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: [HACKERS] Java LISTEN/NOTIFY client library work-around
Next
From: Florent Guillaume
Date:
Subject: Re: JDBC with SSL