Re: alpn + ciphers

Martin Thomson <martin.thomson@gmail.com> Fri, 16 October 2015 19:35 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6541F1AD34C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 16 Oct 2015 12:35:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.012
X-Spam-Level:
X-Spam-Status: No, score=-7.012 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bi6vp7NT9Qfh for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 16 Oct 2015 12:35:05 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CAC8B1ACDC4 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 16 Oct 2015 12:35:05 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ZnAjF-0003oR-GJ for ietf-http-wg-dist@listhub.w3.org; Fri, 16 Oct 2015 19:31:49 +0000
Resent-Date: Fri, 16 Oct 2015 19:31:49 +0000
Resent-Message-Id: <E1ZnAjF-0003oR-GJ@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <martin.thomson@gmail.com>) id 1ZnAjC-0003nk-5C for ietf-http-wg@listhub.w3.org; Fri, 16 Oct 2015 19:31:46 +0000
Received: from mail-yk0-f175.google.com ([209.85.160.175]) by lisa.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <martin.thomson@gmail.com>) id 1ZnAjA-0001zK-7i for ietf-http-wg@w3.org; Fri, 16 Oct 2015 19:31:45 +0000
Received: by ykdz2 with SMTP id z2so9558391ykd.3 for <ietf-http-wg@w3.org>; Fri, 16 Oct 2015 12:31:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ZO3Cf/cHmoQr0ID5NgReYYpQT9rgJcyAUoAsOt0j6p4=; b=H78MqKMXSSV7RsO/TvRgujaD1ATMNZRyVnkj90CIYqFt7yHuzL05qCzPfoOY6Eu2fQ 1C8teoKBs0FQLzbp7QEaypI235rNOskHO1aFpAXv9nzdGB4zw3BfS4K/SG4FhzQlwfvx m7gRpJ7dQiY4mxWXAKNdr+VHUaUF/+d4iLkHRXyIniL49/+gmOfXpfNJNmveaTjZ8QGJ Oxnt3QgribGOOjDWtv3QtrQfiOHAy4BQWFkx8Zd1HZ7hbggpfr/sqJpwq4OWwnnh1/GG ys9LO0h1XtOyWV4XTCseOpVAevHvMBcDbIXIhrlkzw4+sy0ly/AkdfkFPjcv58iLtd0F 7ZIQ==
MIME-Version: 1.0
X-Received: by 10.129.79.129 with SMTP id d123mr11331293ywb.159.1445023878364; Fri, 16 Oct 2015 12:31:18 -0700 (PDT)
Received: by 10.13.230.78 with HTTP; Fri, 16 Oct 2015 12:31:18 -0700 (PDT)
In-Reply-To: <78A44AE4-168D-4129-AF94-38FB66286711@greenbytes.de>
References: <78A44AE4-168D-4129-AF94-38FB66286711@greenbytes.de>
Date: Fri, 16 Oct 2015 12:31:18 -0700
Message-ID: <CABkgnnVz=OyHNvpoEjSBAiLas_fqmHwL_FkvdFtemT9r6=BEyg@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: Stefan Eissing <stefan.eissing@greenbytes.de>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=209.85.160.175; envelope-from=martin.thomson@gmail.com; helo=mail-yk0-f175.google.com
X-W3C-Hub-Spam-Status: No, score=-7.9
X-W3C-Hub-Spam-Report: AWL=1.842, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1ZnAjA-0001zK-7i ee532e6ca961c8430e5e7c80ae0b1790
X-Original-To: ietf-http-wg@w3.org
Subject: Re: alpn + ciphers
Archived-At: <http://www.w3.org/mid/CABkgnnVz=OyHNvpoEjSBAiLas_fqmHwL_FkvdFtemT9r6=BEyg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30375
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

The solution that NSS supports is similar to what we do for other
extensions that affect cipher suite selection.

For ECC the named_curves extension lists some curves.  If you don't
support any of the listed curves, you can't select an ECC-based cipher
suite (either ECDHE or ECDSA).  Thus, in the extension handler, the
stack checks for a good curve, and if it doesn't find one, it disables
all of the affected cipher suites.

Here, the callback can select a protocol as normal.  If it is h2, then
it can disable all the blacklisted ciphers.

On 16 October 2015 at 04:28, Stefan Eissing
<stefan.eissing@greenbytes.de> wrote:
> A question regarding interworking and ALPN + ciphers:
>
> During ALPN callbacks by popular SSL libs such as openssl, the cipher has/may not have been selected. This is a potential interworking problem when h2 is proposed, only to have the connection shutdown with INADEQUATE_SECURITY afterwards.
>
> I am not certain if this is depending on the order TLS extensions appear in the client hello or the particular openssl implementation. Potentially, I could try to change the cipher list during the ALPN callback, but if that will influence things, is probably also not well defined. This you get, when you mix layers, I assume.
>
> I am not sure what is the best way to address this. Limiting the cipher list to only highest grade is often not an option for a server. Any advice appreciated.
>
> //Stefan