Hello Sven,
you will have to register your own secure socket factory.
In that factory, you can establish SSL connections without
verifying certificates. Alas, I don't remember whether such
code is included in the examples or has been posted to the
mailing list. But the topic itself pops up every few months,
so you're likely to find sample code somewhere.
See interface SecureProtocolSocketFactory and class
Protocol (method registerProtocol) to get started.
regards,
Roland
Sven K�hler <[EMAIL PROTECTED]>
12.11.2003 15:10
Please respond to "Commons HttpClient Project"
To: Commons HttpClient Project
<[EMAIL PROTECTED]>
cc:
Subject: SSL-Connection to unstrusted host
Well, the subject says it all:
I'd like to connect to a host with an untrusted SSL-certfictate. When
trying to connect, i always get the following exception:
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
org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1351)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:779)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1145)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2257)
at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2629)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1085)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:674)
...
Is there any option to turn the check off?
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]