Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3653410568 for ; Thu, 2 May 2013 19:01:52 +0000 (UTC) Received: (qmail 21028 invoked by uid 500); 2 May 2013 19:01:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 20963 invoked by uid 500); 2 May 2013 19:01:51 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 20949 invoked by uid 99); 2 May 2013 19:01:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 19:01:51 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of fbarbat@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 May 2013 19:01:46 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UXykb-0001Jy-Dl for users@camel.apache.org; Thu, 02 May 2013 12:01:05 -0700 Date: Thu, 2 May 2013 12:01:05 -0700 (PDT) From: fbarbat To: users@camel.apache.org Message-ID: <1367521265420-5731925.post@n5.nabble.com> Subject: Truststore in HTTP4 component not working MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I use the following code: KeyStoreParameters ksp = new KeyStoreParameters(); ksp.setResource("truststore_test.jks"); ksp.setPassword("password"); TrustManagersParameters trustManagersParameters = new TrustManagersParameters(); trustManagersParameters.setKeyStore(ksp); SSLContextParameters scp = new SSLContextParameters(); scp.setTrustManagers(trustManagersParameters); HttpComponent httpComponent = camelContext.getComponent("http4", HttpComponent.class); httpComponent.setSslContextParameters(scp); After that I configure services and routes. However, when Camel is registering a port in this part of the code: @SuppressWarnings("deprecation") protected void registerPort(boolean secure, X509HostnameVerifier x509HostnameVerifier, int port, SSLContextParameters sslContextParams) throws Exception { SchemeRegistry registry = clientConnectionManager.getSchemeRegistry(); if (secure) { SSLSocketFactory socketFactory; if (sslContextParams == null) { socketFactory = SSLSocketFactory.getSocketFactory(); } else { socketFactory = new SSLSocketFactory(sslContextParams.createSSLContext()); } ... sslContextParams is null so it doesn't use the truststore. What could be happening? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Truststore-in-HTTP4-component-not-working-tp5731925.html Sent from the Camel - Users mailing list archive at Nabble.com.