Re: SSL confirmation - No trusted certificate found

From: Andrew M <andrew(at)jibeya(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SSL confirmation - No trusted certificate found
Date: 2004-12-06 10:53:48
Message-ID: 1BBEB92A-4775-11D9-BC58-0003938366A4@jibeya.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Ok,
spoke to quickly! I am following the example here:

http://archives.postgresql.org/pgsql-jdbc/2003-08/msg00110.php

for ssl support in postgreSQL jdbc (DriverVersion:PostgreSQL 8.0devel
JDBC3 with SSL (build 308)). When I get to the final stage, copying the
certificate into the java keystore:

keytool -keystore [your java home here]/lib/security/cacerts -alias
[any name for the cert you like (i.e. postgres)] -import -file
server.crt.der

I get the following message:

Trust this certificate? [no]:

I enter yes and get:

Certificate was added to keystore

I add ssl to my connection string:

jdbc:postgresql://localhost:5432/mydatabase?ssl

When I launch Jboss, which handles the connection to postgresql, I get
the following error:

javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found

What am I doing wrong here????

many thanks

Andrew

On 6 Dec 2004, at 01:48, Andrew M wrote:

> Hi,
> seems like I may have located the solution to my earlier problem:
>
> http://archives.postgresql.org/pgsql-jdbc/2003-08/msg00110.php
>
> many thanks
>
> Andrew
> On 5 Dec 2004, at 23:51, Doug McNaught wrote:
>
>> Michael Fuhr <mike(at)fuhr(dot)org> writes:
>>
>>> On Sun, Dec 05, 2004 at 09:10:42PM +0000, Andrew M wrote:
>>>
>>>> The map i make reference to is a Jboss map used to make a jndi
>>>> connection to postgreSQL. What document do I need to access to get
>>>> hold
>>>> of the envireonment variables, namely PGSSLMODE?
>>>
>>> I don't know if the J-stuff wraps libpq or if it implements the
>>> communications protocol on its own.
>>
>> The latter. AFAIK it doesn't use environment variables. See the JDBC
>> driver docs for how to set options when connecting.
>>
>> -Doug
>>
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 2: you can get off all lists at once with the unregister command
>> (send "unregister YourEmailAddressHere" to
>> majordomo(at)postgresql(dot)org)
>>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Geoffrey 2004-12-06 11:35:38 Re: When to encrypt
Previous Message peter pilsl 2004-12-06 10:25:22 Re: select single entry and its neighbours using direct-acess

Browse pgsql-jdbc by date

  From Date Subject
Next Message Nicolas Modrzyk 2004-12-06 11:11:42 Re: Question reminder
Previous Message Kris Jurka 2004-12-06 10:47:34 Re: Question reminder