pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chad Files <cpfiles@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: GCJ, SSL Connection Issue
Date: Wed, 30 Nov 2005 07:45:02 -0600
Message-ID: <9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.com> (raw)
In-Reply-To: <9735eb9b0511300542w484769bcxec978aa8ddc83c74@mail.gmail.com>
References: <9735eb9b0511291323q6416ac9cp14bcbf060d418737@mail.gmail.com>
	<Pine.BSO.4.61.0511292022060.25356@leary.csoft.net>
	<9735eb9b0511300542w484769bcxec978aa8ddc83c74@mail.gmail.com>

On 11/29/05, Kris Jurka <books@ejurka.com> wrote:
> This is a limitation of gcj, it doesn't come with a SSL provider by
> default.  You'll need jessie: http://www.nongnu.org/jessie/

I tried using Jessie yesterday with no success. This morning I decided
to read the documentation again to see if I was doing things
correctly. Then I discovered the real issue...The documentation is not
correct for the addProvider method. It should read:

java.security.Security.addProvider(new org.metastatic.jessie.provider.Jessie());

(the provider package is not mentioned in the documentation)

I am sure with the latest version they just moved some classes around.
Anyway I am now able to connect to Postgres remotely over SSL with
GCJ. Here is my connection code encase it is useful for anybody else.

java.security.Security.addProvider(new org.metastatic.jessie.provider.Jessie());

Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://server/database";
Properties props = new Properties();
props.setProperty("user","na");
props.setProperty("password","na");
props.setProperty("ssl","true");
props.setProperty("sslfactory", "org.postgresql.ssl.NonValidatingFactory");
Connection conn = DriverManager.getConnection(url, props);

Thank you for your help.

-- Chad



view thread (3+ messages)

Message-ID: <9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.com>
Permalink:  ../9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.com/
Also on:    postgresql.org/message-id/9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.com

 · 

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: cpfiles@gmail.com
  Subject: Re: GCJ, SSL Connection Issue
  In-Reply-To: <9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.com>
  References: <9735eb9b0511291323q6416ac9cp14bcbf060d418737@mail.gmail.com> <Pine.BSO.4.61.0511292022060.25356@leary.csoft.net> <9735eb9b0511300542w484769bcxec978aa8ddc83c74@mail.gmail.com> <9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.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