Re: SSL URL - Mailing list pgsql-jdbc
From | Phil Moors |
---|---|
Subject | Re: SSL URL |
Date | |
Msg-id | 1090509297.1582.7.camel@pm0 Whole thread Raw |
In response to | Re: SSL URL (Kris Jurka <books@ejurka.com>) |
Responses |
Re: SSL URL
|
List | pgsql-jdbc |
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 atsun.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
pgsql-jdbc by date: