I'm having problems getting HttpClient to work with unsigned certificates over https. Using HttpClient right out of the box, I get the following exception:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
So I looked at the documentation a bit more carefully and discovered EasySSLProtocolSocketFactory. This class apparently solves my problem, but I can not get it to compile. Nor can I get EasyX509TrustManager to compile. Strangely enough the compiler is telling me that certain classes in HttpClient do not exist. Specifically, the following five lines:
import org.apache.commons.httpclient.ConnectTimeoutException;
import org.apache.commons.httpclient.HttpClientError;
import org.apache.commons.httpclient.params.HttpConnectionParams;
import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
import org.apache.commons.httpclient.protocol.ReflectionSocketFactory;
And this is from within a project where I can build the HttpClientTutorial with no problem. So I guess my questions are:
1.) Is there anywhere I can download a jar of the org.apache.commons.httpclient.contrib.ssl package?
2.) Is there an obvious reason why the compiler is not seeing the classes listed above? Is EasySSLProtocolSocketFactory compatible with HttpClient 2.0? I am working with HttpClient 2.0 on Mac OS X 10.3 and Java 1.4.1.
Any advice is appreciated,
Dennis Crall
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
