X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 48933D1B199 for ; Thu, 15 Jul 2004 06:39:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80354-09 for ; Thu, 15 Jul 2004 09:39:32 +0000 (GMT) Received: from smtp-bal.opennet.it (noder32-48.opennet.it [212.110.32.48]) by svr1.postgresql.org (Postfix) with SMTP id E5A84D1B18C for ; Thu, 15 Jul 2004 06:39:22 -0300 (ADT) Received: (qmail 12472 invoked from network); 15 Jul 2004 09:20:54 -0000 Received: from unknown (HELO comai04) (212.110.56.34) by 0 with SMTP; 15 Jul 2004 09:20:54 -0000 Message-ID: <005401c46a50$b59e60c0$0501a8c0@comai04> From: "Stefano Bonnin" To: "Kris Jurka" Cc: References: <001601c469a8$87de94f0$0501a8c0@comai04> Subject: Re: SSL Problem Date: Thu, 15 Jul 2004 11:47:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/182 X-Sequence-Number: 10566 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" To: "Stefano Bonnin" Cc: 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@postgresql.org) >