hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@managesoft.com>
Subject Re: SSL-Connection to unstrusted host
Date Wed, 12 Nov 2003 14:42:57 GMT
H Sven, Roland,

There's an example socket factory available on the website:

http://jakarta.apache.org/commons/httpclient/sslguide.html

Have a look for the EasySSLProtocolSocketFactory class.

Hope that helps.

Cheers,

Marcus

On Wed, 2003-11-12 at 15:34, Roland Weber wrote:
> 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 <skoehler@upb.de>
> 12.11.2003 15:10
> Please respond to "Commons HttpClient Project"
>  
>         To:     Commons HttpClient Project 
> <commons-httpclient-dev@jakarta.apache.org>
>         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: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message