Re: SSL Problem

From: "Stefano Bonnin" <stefano(dot)bonnin(at)comai(dot)to>
To: "Kris Jurka" <books(at)ejurka(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: SSL Problem
Date: 2004-07-15 09:47:14
Message-ID: 005401c46a50$b59e60c0$0501a8c0@comai04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

The postgresql server log gives me the following error:

****
could not initialize SSL connection: sslv3 alert certificate unknown
****

What's wrong in my operations?
About the certificate I did the following operations:

cd \ postgres_data_dir
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
openssl x509 -in server.crt -out server.crt.der -outform der

keytool -keystore /usr/local/j2sdk1.4.2_04/jre/lib/security/cacerts -alias
postgres -import -file server.crt.der

... then I typed changeit as password

What I did't undestand in this steps is the following:

keytool -keystore ... etc ...

import the certificate in the java keystore and the JDBC driver *must* find
the certificate in the keystore and download it on the client, is't true? (I
dont't know if this is true) BUT if my affermation is true HOW the JDBC
driver (on the client) can find it in
/usr/local/j2sdk1.4.2_04/jre/lib/security?

Reds.

----- Original Message -----
From: "Kris Jurka" <books(at)ejurka(dot)com>
To: "Stefano Bonnin" <stefano(dot)bonnin(at)comai(dot)to>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Sent: Thursday, July 15, 2004 9:44 AM
Subject: Re: [JDBC] SSL Problem

>
>
> On Wed, 14 Jul 2004, Stefano Bonnin wrote:
>
> > Hi, I have seen the same problem in the past of this list but I don't
> > know how (and if) it has been solved. I'm trying to connect my java
> > stand alone application with postgres 7.4.2 via SSL.
> >
> > I followed the istructions ...
> > http://archives.postgresql.org/pgsql-jdbc/2003-08/msg00110.php ... and
> > then I tryed an SSL connection with pgAdmin: all works correctly After I
> > tryed to connect via java and the following error appear on the screen:
> >
> > converting regular socket connection to ssl
> > org.postgresql.util.PSQLException
> > at org.postgresql.core.PGStream.flush(PGStream.java:415)
> > at
org.postgresql.jdbc1.AbstractJdbc1Connection.openConnectionV3(Abstrac
> > tJdbc1Connection.java:284)
>
> I can't say I've seen this error before. Do you have any other
> information? The server log might say something about what happened on
> that end.
>
> Kris Jurka
>
>
> ---------------------------(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)
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jan de Visser 2004-07-15 11:15:35 Re: Very strange Error in Updates
Previous Message Oliver Jowett 2004-07-15 09:14:59 Re: error codes using JDBC