Re: alpn + ciphers

Martin Thomson <> Fri, 16 October 2015 19:35 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 6541F1AD34C for <>; Fri, 16 Oct 2015 12:35:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -7.012
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Bi6vp7NT9Qfh for <>; Fri, 16 Oct 2015 12:35:05 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id CAC8B1ACDC4 for <>; Fri, 16 Oct 2015 12:35:05 -0700 (PDT)
Received: from lists by with local (Exim 4.80) (envelope-from <>) id 1ZnAjF-0003oR-GJ for; Fri, 16 Oct 2015 19:31:49 +0000
Resent-Date: Fri, 16 Oct 2015 19:31:49 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1ZnAjC-0003nk-5C for; Fri, 16 Oct 2015 19:31:46 +0000
Received: from ([]) by with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <>) id 1ZnAjA-0001zK-7i for; Fri, 16 Oct 2015 19:31:45 +0000
Received: by ykdz2 with SMTP id z2so9558391ykd.3 for <>; Fri, 16 Oct 2015 12:31:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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 with SMTP id d123mr11331293ywb.159.1445023878364; Fri, 16 Oct 2015 12:31:18 -0700 (PDT)
Received: by with HTTP; Fri, 16 Oct 2015 12:31:18 -0700 (PDT)
In-Reply-To: <>
References: <>
Date: Fri, 16 Oct 2015 12:31:18 -0700
Message-ID: <>
From: Martin Thomson <>
To: Stefan Eissing <>
Cc: HTTP Working Group <>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=;;
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: 1ZnAjA-0001zK-7i ee532e6ca961c8430e5e7c80ae0b1790
Subject: Re: alpn + ciphers
Archived-At: <>
X-Mailing-List: <> archive/latest/30375
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-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
<> 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