Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 57126 invoked from network); 12 Nov 2003 14:43:04 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Nov 2003 14:43:04 -0000 Received: (qmail 39521 invoked by uid 500); 12 Nov 2003 14:42:59 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 39504 invoked by uid 500); 12 Nov 2003 14:42:59 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 39489 invoked from network); 12 Nov 2003 14:42:58 -0000 Received: from unknown (HELO fw03.mgsft.com) (81.2.149.2) by daedalus.apache.org with SMTP; 12 Nov 2003 14:42:58 -0000 Received: (qmail 23686 invoked by uid 0); 12 Nov 2003 14:42:57 -0000 Received: from lucifer.mgsft.com (192.168.20.78) by fw03.osa.de with SMTP; 12 Nov 2003 14:42:57 -0000 Subject: Re: SSL-Connection to unstrusted host From: Marcus Crafter To: Commons HttpClient Project In-Reply-To: References: Content-Type: text/plain; charset=iso-8859-1 Organization: ManageSoft Corporation Message-Id: <1068648177.1896.45.camel@lucifer> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Wed, 12 Nov 2003 15:42:57 +0100 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 > 12.11.2003 15:10 > Please respond to "Commons HttpClient Project" > > To: Commons HttpClient Project > > 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