Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-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 4580AD577 for ; Wed, 31 Oct 2012 12:59:03 +0000 (UTC) Received: (qmail 65264 invoked by uid 500); 31 Oct 2012 12:59:02 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 64698 invoked by uid 500); 31 Oct 2012 12:58:51 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 64644 invoked by uid 99); 31 Oct 2012 12:58:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 12:58:49 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [217.150.250.48] (HELO kalnich.nine.ch) (217.150.250.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2012 12:58:43 +0000 Received: by kalnich.nine.ch (Postfix, from userid 1000) id 75208B801DE; Wed, 31 Oct 2012 13:58:22 +0100 (CET) Date: Wed, 31 Oct 2012 13:58:22 +0100 From: Oleg Kalnichevski To: HttpClient User Discussion Subject: Re: Detecting when SSL socket connects Message-ID: <20121031125822.GA30760@kalnich.nine.ch> Mail-Followup-To: HttpClient User Discussion References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Oct 30, 2012 at 02:42:47PM -0700, John Sheehy wrote: > Hi all, > > using HttpComponents client 4.2.2, is there a way I can be notified when an > SSL connection is ready for writing? I'm using a > PoolingClientConnectionManager and I think I need to somehow override > DefaultClientConnection's update() method which should be called when the > TLS negotiation is complete, but I'm not sure how the plumbing works. > > Any help appreciated, > John. John JSSE API exposes a simple and effective mechanism of getting SSL protocol level notifications by registering a listener on an SSL socket instance http://docs.oracle.com/javase/6/docs/api/javax/net/ssl/SSLSocket.html#addHandshakeCompletedListener%28javax.net.ssl.HandshakeCompletedListener%29 All it probably takes on the HttpClient side is a custom socket factory or a hostname verifier. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org