Re: GCJ, SSL Connection Issue

From: Chad Files <cpfiles(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: GCJ, SSL Connection Issue
Date: 2005-11-30 13:45:02
Message-ID: 9735eb9b0511300545l63b2be84x5e6cfe5d95b0e127@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On 11/29/05, Kris Jurka <books(at)ejurka(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Aydın Toprak 2005-12-01 17:20:07 What is the exact Deal with Maintenance DB ?
Previous Message Kris Jurka 2005-11-30 10:03:33 Re: Driver does not report all catalogs