Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B32217EBE for ; Thu, 4 Jun 2015 16:19:47 +0000 (UTC) Received: (qmail 50373 invoked by uid 500); 4 Jun 2015 16:19:46 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 50309 invoked by uid 500); 4 Jun 2015 16:19:46 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 50299 invoked by uid 99); 4 Jun 2015 16:19:46 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2015 16:19:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1F4AC181A44 for ; Thu, 4 Jun 2015 16:19:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.011 X-Spam-Level: X-Spam-Status: No, score=-0.011 tagged_above=-999 required=6.31 tests=[SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id n7IyBWrLIXx8 for ; Thu, 4 Jun 2015 16:19:41 +0000 (UTC) Received: from mail.greenbytes.de (mail.greenbytes.de [217.91.35.233]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 141FC43AC7 for ; Thu, 4 Jun 2015 16:19:40 +0000 (UTC) Received: from delight.fritz.box (unknown [84.150.91.31]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 1FF3415A34A6 for ; Thu, 4 Jun 2015 18:19:03 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: ALPN patch comments From: Stefan Eissing In-Reply-To: Date: Thu, 4 Jun 2015 18:19:02 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <13AA0595-AAA5-4150-8FFD-CABC8E780EB6@greenbytes.de> References: To: dev@httpd.apache.org X-Mailer: Apple Mail (2.2098) I think we need to clarify some things: 1. ALPN is initiated by the client. When a client does not send ALPN as = part of client helo, the SSL alpn callbacks are not invoked and the = server does not send any ALPN information back. This is different from = NPN. 2. SSLAlpnPreference is intended as the final word to make a choice when = either one ALPN callback proposes many protocols or of several callbacks = propose protocols. So, when mod_spdy and mod_h2 are active *and* the = client claims to support spdy/3.1 and h2, the SSLAlpnPreference = determines what gets chosen and sent to the client. This was not = necessary with NPN as in that SSL extension the client was making the = choice. 3. Independent of the client proposal, as I read the spec, the server is = free to chose any protocol identifier it desires. This might result in = the client closing the connection. So, if the client uses ALPN and the = server does not want/cannot do/is configured not to support any of the = clients proposals, httpd can always send back =E2=80=9Ehttp/1.1=E2=80=9C = since this is what it always supports. In this light, and correct me if I=E2=80=99m wrong, I see no benefit and = only potential harm by introducing a =E2=80=9ESSLALpn on|off=E2=80=9C = configuration directive. I think the current implementation covers all = use cases and if one is missing, please point out the scenario. As with the register once or on every connection optimization, yes, = there might be some performance to gain. But I think it is not so = straightforward to implement this, as not only the address and port = influences this but also the SNI that gets send in the client helo. So, = one would have at least to verify that registering an ALPN callback = *after* the connection is open and SNI has been received has any effect.=20= cheers, Stefan > Am 04.06.2015 um 14:52 schrieb Yann Ylavic : >=20 > On Thu, Jun 4, 2015 at 2:39 PM, Yann Ylavic = wrote: >> On Thu, Jun 4, 2015 at 2:30 PM, Eric Covener = wrote: >>>=20 >>>=20 >>> On Thu, Jun 4, 2015 at 8:08 AM Yann Ylavic = wrote: >>>>=20 >>>> I think what makes the thing a bit awkward is that the >>>> negotiable/preferred ALNP identifiers (protocols) is configurable = in >>>> both httpd (SSLAlpnPreference) and mod_h2 (hard coded). >>>> The former is only a hint while the latter is the real proposal to = the >>>> client (with the fall back to "http/1.1"). >>>>=20 >>>> Maybe it would be cleaner to let the modules register the ALPN >>>> identifiers (at configure time, with another optional function), = and >>>> get rid of SSLAlpnPreference on mod_ssl side. >>>> If no identifier is registered, mod_ssl won't register the ALPN >>>> callback either, so that httpd continues to work without ALPN when = not >>>> needed. >>>>=20 >>> I think we need SSLAlpnPreference any time modules register ALPN = protocols, >>> otherwise the admin has no control over whih is negotiated. I don't = think >>> we should rip it out. >>=20 >> OK, so it should probably be renammed SSLAlpnIDs or similar, and be >> more than just a hint when configured (i.e. refuse connection if no >> client ALPN ID matches). >=20 > I meant fall back to "http/1.1" still, not refuse the connection. bytes GmbH Hafenweg 16, 48155 M=C3=BCnster, Germany Phone: +49 251 2807760. Amtsgericht M=C3=BCnster: HRB5782