From: Phil Moors <pmoors@ncric.com>
To: pgsql-jdbc List <pgsql-jdbc@postgresql.org>
Subject: Re: SSL URL
Date: Thu, 22 Jul 2004 11:14:57 -0400
Message-ID: <1090509297.1582.7.camel@pm0> (raw)
In-Reply-To: <Pine.BSO.4.56.0407211539270.9870@leary.csoft.net>
References: <1090441973.27063.17.camel@pm0>
<Pine.BSO.4.56.0407211539270.9870@leary.csoft.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pmoors@ncric.com
Subject: Re: SSL URL
In-Reply-To: <1090509297.1582.7.camel@pm0>
References: <1090441973.27063.17.camel@pm0> <Pine.BSO.4.56.0407211539270.9870@leary.csoft.net> <1090509297.1582.7.camel@pm0>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox