Hi,

I have written Jersey RESTful clients that made use of a Dumb X509TrustManager 
and a HostnameVerifier to trust all SSL certs on our lab systems to make it 
easier to deal with certs that are self-signed.  

        ClientConfig config = new DefaultClientConfig();
        SSLContext context = null;
        try
        {
            context = SSLContext.getInstance("SSL");
            context.init(null,
                    new TrustManager[] { new DumbX509TrustManager() },
                    null);
            config.getProperties()
                    .put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
                            new HTTPSProperties(this.getHostnameVerifier(),
                                    context));
            webClient = Client.create(config);
        }
        ....

Is there a way for me to do something similar using CXF?

Thanks!

(please note that I have also posted this on StackOverflow: 
http://stackoverflow.com/questions/7881122/cxf-restful-client-how-to-do-trust-all-certs)




Reply via email to