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 F0282D1B1D5 for ; Thu, 22 Jul 2004 12:16:14 -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 94877-05 for ; Thu, 22 Jul 2004 15:16:11 +0000 (GMT) Received: from pm0.ncric.com (unknown [63.217.139.42]) by svr1.postgresql.org (Postfix) with ESMTP id 74EBCD1B392 for ; Thu, 22 Jul 2004 12:16:05 -0300 (ADT) Received: from pm0.ncric.com (localhost.localdomain [127.0.0.1]) by pm0.ncric.com (8.12.10/8.12.10) with ESMTP id i6MFEvYE009470 for ; Thu, 22 Jul 2004 11:14:58 -0400 Received: (from pmoors@localhost) by pm0.ncric.com (8.12.10/8.12.10/Submit) id i6MFEv5A009468 for pgsql-jdbc@postgresql.org; Thu, 22 Jul 2004 11:14:57 -0400 Subject: Re: SSL URL From: Phil Moors Reply-To: pmoors@ncric.com To: pgsql-jdbc List In-Reply-To: References: <1090441973.27063.17.camel@pm0> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: NCRIC Message-Id: <1090509297.1582.7.camel@pm0> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Thu, 22 Jul 2004 11:14:57 -0400 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/263 X-Sequence-Number: 10647 On Wed, 2004-07-21 at 16:43, Kris Jurka wrote: > If this is the only way to do it, then in the 7.4 source tree see > org/postgresql/jdcb1/AbstractJdbc1Connection.java in the openConnection > method: > > if (info.getProperty("ssl") != null && Driver.sslEnabled()) > { > useSSL = true; > } > else > { > useSSL = false; > } > I changed false to true and recompiled. The resulting postgresql.jar file trips the following errors. I'm using a self signed certificate for an internal development box. I used the Sun sdk version 1.4.2_05 because ColdFusion's jre is 1.4.2. Connection verification failed for data source: dweb []java.sql.SQLException: An I/O error has occured while flushing the output - Exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found Stack Trace: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124) at org.postgresql.core.PGStream.flush(PGStream.java:412) at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnectionV3(AbstractJdbc1Connection.java:284) at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:213) at org.postgresql.Driver.connect(Driver.java:139) at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:511) at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:64) at java.lang.Thread.run(Thread.java:534) Caused by: sun.security.validator.ValidatorException: No trusted certificate found at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304) at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107) at sun.security.validator.Validator.validate(Validator.java:202) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA6275) at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA6275) ... 16 more End of Stack Trace The root cause was that: java.sql.SQLException: An I/O error has occured while flushing the output - Exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found Stack Trace: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66) at java.io.Buffere... Phil