Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 26830 invoked from network); 9 Apr 2010 02:09:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Apr 2010 02:09:33 -0000 Received: (qmail 87084 invoked by uid 500); 9 Apr 2010 02:09:33 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 87019 invoked by uid 500); 9 Apr 2010 02:09:32 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 87011 invoked by uid 500); 9 Apr 2010 02:09:32 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 87008 invoked by uid 99); 9 Apr 2010 02:09:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Apr 2010 02:09:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Apr 2010 02:09:29 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 87AA3234C052 for ; Fri, 9 Apr 2010 02:09:08 +0000 (UTC) Message-ID: <1845967596.14771270778948540.JavaMail.jira@brutus.apache.org> Date: Fri, 9 Apr 2010 02:09:08 +0000 (UTC) From: "Ashwin Karpe (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Created: (CAMEL-2625) Improvements and minor change requests to camel-netty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org Improvements and minor change requests to camel-netty ----------------------------------------------------- Key: CAMEL-2625 URL: https://issues.apache.org/activemq/browse/CAMEL-2625 Project: Apache Camel Issue Type: Improvement Reporter: Ashwin Karpe Fix For: 2.3.0 (Request by Gareth Collins via nabble request...) Would it be possible to make the TrustManager optional for Netty SSL support? I made a change in my local version of camel-netty and it works for me (file org.apache.camel.component.netty.ssl.SSLEngineFactory - replacement for the original SSLEngineFactory constructor): public SSLEngineFactory(File keyStoreFile, File trustStoreFile, char[] passphrase) throws Exception { super(); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(IOConverter.toInputStream(keyStoreFile), passphrase); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, passphrase); sslContext = SSLContext.getInstance(SSL_PROTOCOL); if (trustStoreFile != null) { KeyStore ts = KeyStore.getInstance("JKS"); ts.load(IOConverter.toInputStream(trustStoreFile), passphrase); TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); tmf.init(ts); sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); } else { sslContext.init(kmf.getKeyManagers(), null, null); } } I ask for this as I have to contact a server where SSL will not work properly if a TrustManager is installed. If this could go in before CAMEL 2.3 it would be much appreciated. A couple of questions about the netty implementation: (1) Is there a reason why JKS was hardcoded here, rather than allowing the key store format to be configured? (2) When I add the TrustManager using netty for the connection where it could not be used, netty throws me no exception, the connection remains open, but the messages I send do not get to the server. If I connect directly using an SSLSocket I see a javax.net.ssl.SSLHandshakeException. Is there something I am missing here? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.