From: Benjamin W. Fisher <kurasoe@fastmail.fm>
To: pgsql-jdbc@postgresql.org
Subject: JBuilder Question
Date: Mon, 04 Apr 2005 16:37:35 -0700
Message-ID: <1112657855.23386.231106996@webmail.messagingengine.com> (raw)
Hey. I've been trying to set myself up so that I can use the JDBC to
connect to my SSL postgres server. I got the 3x version (8.x too)
latest from the site, and am able to utilize it in my Java code. It
works until I set the ssl property to true in a connection. Then it
cannot connect. I followed the directions on postgresql.org for setting
up my little server to utilize SSL. And I have postgres compiled with
openssl, yes.
As far as what I did to get the SSL working, I did as per the docs say:
Server-side:
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
rm privkey.pem
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod og-rwx server.key
Client-side:
openssl x509 -in server.crt -out server.crt.der -outform der
keytool -keystore $JAVA_HOME/lib/security/cacerts -alias postgresql
-import -file server.crt.der
keytool -keystore mystore -alias postgresql -import -file server.crt.der
I got through all that.
But the java -Djavax.net.ssl.trustStore=mystore
-Djavax.net.ssl.trustStorePassword=mypassword com.mycompany.MyApp I'm
not sure how to get in there, since I use JBuilder. I know how to add
in required libraries (*.jar) for it, but not sure about this kind of
thing.
Anyone know how to do this?
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: kurasoe@fastmail.fm
Subject: Re: JBuilder Question
In-Reply-To: <1112657855.23386.231106996@webmail.messagingengine.com>
References: <1112657855.23386.231106996@webmail.messagingengine.com>
* 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