Forgot about the HostNameVerifier. You may be able to get by with a pass-through version since the SocketFactory you will be wrapping probably is doing this for you as well. (I am not looking at the API right now, but I think there is an AllowAllHostNameVerifier included in the library.)
> Plus I don't follow at all once I get a hold of the SSLSocketFactory what to > do with it. Somehow like I wrote it has to be injected into either the HTTPClient or HTTPParam classes to be used. SSLSocketFactory fact = ... scheme = new Scheme(protocol, port , fact); //"http" or "https" for the protocol schemeRegistry = new SchemeRegistry(); schemeRegistry.register(scheme); connectionManager = new ThreadSafeClientConnManager(schemeRegistry); > Also I don't get why SSL is mixed in since a normal HttpURLConnection picks > up the NTML credentials and dumps them over to the proxy. I would think this methodology would work with a non-SSL connection as well. If you are not using SSL, you may need to create your own wrapper to wrap the non-ssl socket factory. Looking quickly at org.apache.http.conn.scheme.PlainSocketFactory I see that it does not defer to a SocketFactory to create its sockets. However it is not a complicated class, and I don't think it would be hard to write one. You may just be able to override the PlainSocketFactory class and then override the createSocket() methods with ones that use the specified socket factory as opposed to just doing new Socket(). (I am not sure if you should implement the LayeredSocketFactory interface as well.) -----Original Message----- From: Matthew Young [mailto:[email protected]] Sent: Friday, June 29, 2012 4:51 AM To: [email protected] Subject: RE: HTTPClient ntlm smart card Must be missing something basic.... In 4.2 of httpclient there is no constructor for the new org.apache.http.conn.ssl.SSLSocketFactory with a single argument of javax.net.ssl.SSLSocketFactory rather: /** * @since 4.2 */ public SSLSocketFactory( final javax.net.ssl.SSLSocketFactory socketfactory, final X509HostnameVerifier hostnameVerifier) Plus I don't follow at all once I get a hold of the SSLSocketFactory what to do with it. Somehow like I wrote it has to be injected into either the HTTPClient or HTTPParam classes to be used. Also I don't get why SSL is mixed in since a normal HttpURLConnection picks up the NTML credentials and dumps them over to the proxy. -- View this message in context: http://old.nabble.com/HTTPClient-ntlm-smart-card-tp34070660p34090291.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
