users@jersey.java.net

[Jersey] Re: ApacheConnectorProvider and SSL

From: ritup <ritu.krishnan_at_gmail.com>
Date: Fri, 11 Sep 2015 05:07:27 -0700 (MST)

I am trying to do SSl connection with Apache Connector Provider , with
following versions.
ApacheConnectorProvider 2.13
Jax-RS 2.13

My code snippet:
/ ClientConfig clientConfig = new ClientConfig();
            clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER,
new PoolingHttpClientConnectionManager());
            SslConfigurator sslConfig =
SslConfigurator.newInstance().trustStoreFile(System.getProperty(ConduitPlatformConstantsInternal.JAVA_HOME_PROPERTY_NAME)
+
ConduitPlatformConstantsInternal.Conduit.Keystore.KEYSTOREURL).securityProtocol("SSL")
;
            
clientConfig.property(ApacheClientProperties.SSL_CONFIG,sslConfig) ;
            restClient = ClientBuilder.newClient(clientConfig);/

However ,the SSL doesnt work I get Certificate not verified error :
/Certificate not verified. at
org.glassfish.jersey.apache.connector.ApacheConnector.apply/

Please let me know if there is a work around for this




--
View this message in context: http://jersey.576304.n2.nabble.com/ApacheConnectorProvider-and-SSL-tp7583082p7583433.html
Sent from the Jersey mailing list archive at Nabble.com.