Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SSLHandshakeException: Could not find trusted certificate - how to override

2 views
Skip to first unread message

Kai Hackemesser

unread,
Jun 14, 2002, 6:29:40 AM6/14/02
to
I get following exception after trying a connect() on a HttpsURLconnection.
I assume the server certificate isn't actual but I have no chance to change
that. I think that it is possible to override the check, like in Internet
Explorer after the popup window asks about accepting a certificat if it
doesn't meet all criterias. So what do I have to do?

Thanks in advance,
Kai

Could not find trusted certificate
javax.net.ssl.SSLHandshakeException: Could not find trusted certificate
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(DashoA6275)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(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.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:58)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA
6275)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA6275)


Ron Chittaro

unread,
Jun 14, 2002, 11:10:06 AM6/14/02
to
You will have to create your own Trust Manager class (one that implements
X509TrustManager) and initialize your SSLContext with an instance of that
object.

Ron


"Kai Hackemesser" <ka...@gmx.de> wrote in message
news:aecgin$bvl$07$1...@news.t-online.com...

0 new messages