pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Walter Hurry <walterhurry@lavabit.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC with SSL
Date: Mon, 5 Dec 2011 18:46:42 +0000 (UTC)
Message-ID: <jbj3ii$9ab$1@dough.gmane.org> (raw)
References: <jbg7qf$9mn$1@dough.gmane.org>
	<CAF-4BpMJrya0ioXz4vn61bp2BG0X8YR6VkJ00do02n=gM=G2FA@mail.gmail.com>
	<jbgma6$a91$1@dough.gmane.org>
	<4EDC1031.2010607@ringerc.id.au>

On Mon, 05 Dec 2011 08:28:33 +0800, Craig Ringer wrote:

> You don't need the SecurityManager enabled. You need the java.net.ssl
> properties for keyStore, keyStorePassword and keyStoreType set to point
> to your JECKS keystore, and need trustStore, trustStorePassword and
> trustStoreType set to point to the keystore you imported the database's
> certificate into, which is probably the same store in your case.
 
<snip option 2>

Thanks for the guidance, Craig. I'm trying to use javax.net.ssl but I'm 
still stuck. Sample below:
-------------------------------------------------------------
$ java -Djavax.net.ssl.keyStore=$HOME/.postgresql/clientstore \
       -Djavax.net.ssl.keyStorePassword=changeit \
       -Djavax.net.ssl.keyStoreType="jks" \
       -Djavax.net.ssl.trustStore=$JAVA_HOME/lib/security/cacerts \
       -Djavax.net.ssl.trustStorePassword=changeit \
       -Djavax.net.ssl.trustStoreType="jks" \
       JDBCExample neptune misc
-------- PostgreSQL JDBC Connection Testing ------------
PostgreSQL JDBC driver registered
Getting connection to jdbc:postgresql://neptune/misc
Connect failed: FATAL: connection requires a valid client certificate
-------------------------------------------------------------

Any idea what I am doing wrong?

Thanks.





view thread (25+ messages)  latest in thread

Message-ID: <jbj3ii$9ab$1@dough.gmane.org>
Permalink:  ../jbj3ii$9ab$1@dough.gmane.org/
Also on:    postgresql.org/message-id/jbj3ii$9ab$1@dough.gmane.org

 · 

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: walterhurry@lavabit.com
  Subject: Re: JDBC with SSL
  In-Reply-To: <jbj3ii$9ab$1@dough.gmane.org>
  References: <jbg7qf$9mn$1@dough.gmane.org> <CAF-4BpMJrya0ioXz4vn61bp2BG0X8YR6VkJ00do02n=gM=G2FA@mail.gmail.com> <jbgma6$a91$1@dough.gmane.org> <4EDC1031.2010607@ringerc.id.au> <jbj3ii$9ab$1@dough.gmane.org>

* 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