RE: Expectations for TLS session reuse

Mike Bishop <> Mon, 12 December 2016 17:57 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 42FBF12968D for <>; Mon, 12 Dec 2016 09:57:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -9.896
X-Spam-Status: No, score=-9.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-2.896, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 9pRVMiKDEoJw for <>; Mon, 12 Dec 2016 09:57:17 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 3E907129550 for <>; Mon, 12 Dec 2016 09:57:17 -0800 (PST)
Received: from lists by with local (Exim 4.80) (envelope-from <>) id 1cGUoG-0005wr-Jl for; Mon, 12 Dec 2016 17:54:44 +0000
Resent-Date: Mon, 12 Dec 2016 17:54:44 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1cGUo2-0005tR-OV for; Mon, 12 Dec 2016 17:54:30 +0000
Received: from ([] by with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from <>) id 1cGUnv-0001YS-HL for; Mon, 12 Dec 2016 17:54:25 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6rWEdLF6+OJcWULRrdzqc3//FMXcxomONJ2TzxDKI38=; b=OzeK/jukZubBQR8O4RWZLA7bNMfUkiJeutF7SuSODhDZb13W6cC7nGqSdT7kV5IaN6q0ixqH94xJwvEK+AIYHa65kUN11+/AN0eIo7cXksazBjQHXtsPZeeqXtP9CRGJ/FMJyO2e1TkDgn5E2BXZSqXzFes3w6CLtCwJByvpOes=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.771.8; Mon, 12 Dec 2016 17:53:56 +0000
Received: from ([]) by ([]) with mapi id 15.01.0771.014; Mon, 12 Dec 2016 17:53:56 +0000
From: Mike Bishop <>
To: Lucas Pardue <>, Patrick McManus <>, Martin Thomson <>
CC: HTTP Working Group <>
Thread-Topic: Expectations for TLS session reuse
Date: Mon, 12 Dec 2016 17:53:55 +0000
Message-ID: <>
References: <7CF7F94CB496BF4FAB1676F375F9666A376AAB1E@bgb01xud1012> <> <> <7CF7F94CB496BF4FAB1676F375F9666A376B04C7@bgb01xud1012>
In-Reply-To: <7CF7F94CB496BF4FAB1676F375F9666A376B04C7@bgb01xud1012>
Accept-Language: en-US
Content-Language: en-US
authentication-results: spf=none (sender IP is );
x-originating-ip: [2001:4898:80e8:7::51f]
x-ms-office365-filtering-correlation-id: 4196824e-1bc3-43a5-f2ce-08d422b7d7cf
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2708;
x-microsoft-exchange-diagnostics: 1; BN6PR03MB2708; 7:X6vBA22fYjnNWWn1TH44M4lFBAc23MEOlnWh2JGt82kiB9+T9d2fUad3/Yl4jfSIAyaH7J+M+ymPaiQb0K6fkpZ4ksnqjUsVsiyLzwLDILpqMOpuSBK2LcEfx0cLUgc18bVVE5VPcrZzjPdJr+4kfxiPSWIkpk3zJOWxLwpkDciy5GC34iTCpb2g8xZBGCBkkr3U1g9CZFxebgmPU6yWW9+gp/tBtNvdK7ByF8Ms2+YnNzKD9Sg0A4yhCzccPaITEl6OmQxfzDsD8UvayAYSXXlgILI5D+RgClEOX5Wcdb+gZQULTKzHJ6jU7NmmWtuMoce6T5ESb/3Xz64/09LwF6PB++CMZx1KeQ0xIA7BLD5hFJVtw0S4MUx0H36gR2AdVkVlzmmgDYtDC3UNguU6hg64N1Hg8AS/XOGLinPeSRCVrLnn63ix1+Wc+lG1T3oVjQs1SHdpAa6hjBu6GFA/dlPza/CfuqX5bQV5v/vfLJk=
x-microsoft-antispam-prvs: <>
x-exchange-antispam-report-test: UriScan:(158342451672863)(204407124797145)(127952516941037)(21748063052155)(21532816269658);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(6072148)(6047074); SRVR:BN6PR03MB2708; BCL:0; PCL:0; RULEID:; SRVR:BN6PR03MB2708;
x-forefront-prvs: 0154C61618
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(39450400003)(39860400002)(39850400002)(39410400002)(39840400002)(69224002)(189002)(53754006)(24454002)(199003)(377454003)(51444003)(7736002)(8676002)(76176999)(50986999)(6506006)(54356999)(102836003)(2950100002)(74316002)(3660700001)(6116002)(5005710100001)(81156014)(6436002)(229853002)(38730400001)(10290500002)(77096006)(790700001)(7696004)(39060400001)(7906003)(99286002)(76576001)(9686002)(93886004)(81166006)(8936002)(106356001)(5890100001)(16601075003)(101416001)(3280700002)(33656002)(189998001)(10090500001)(14971765001)(2906002)(5660300001)(68736007)(4326007)(105586002)(92566002)(2900100001)(122556002)(86612001)(8990500004)(5001770100001)(606005)(86362001)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR03MB2708;; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None ( does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BN6PR03MB2708F28F1828C5278E71938087980BN6PR03MB2708namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Dec 2016 17:53:55.9430 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR03MB2708
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: AWL=-2.404, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_NW=0.5
X-W3C-Scan-Sig: 1cGUnv-0001YS-HL e920caa48b12836cf89bd600e73564e0
Subject: RE: Expectations for TLS session reuse
Archived-At: <>
X-Mailing-List: <> archive/latest/33153
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

The closest to a rule is in the definition for SNI, RFC 6066:  “If the server_name is
   established in the TLS session handshake, the client SHOULD NOT
   attempt to request a different server name at the application layer.”

It’s certainly not an absolute prohibition, but prior to HTTP/2, I’m not aware of any client that violated the SHOULD, and there were servers that enforced that they matched (including ours).  Prior to Server 2016, when we added HTTP/2 support, making a request for a different host than you’d requested in SNI received a 400 response.  I believe Apache had similar behavior.

HTTP/2 explicitly permits this behavior in certain circumstances; that caused many implementations to loosen their requirements.  No RFC for HTTP/1.1 had language contradicting RFC 6066.  I’m not aware of anyone having backported this behavior into their HTTP/1.1 clients, though as you note, nothing stops them from trying.

From: Lucas Pardue []
Sent: Monday, December 12, 2016 9:21 AM
To: Patrick McManus <>; Martin Thomson <>
Cc: HTTP Working Group <>
Subject: RE: Expectations for TLS session reuse

Thanks for all of your responses. My general impression is that the expectations are not 100% clear cut.

Mike has made a good point about the phrasing of my original question (HTTP/1.1 and HTTP/2 in the same breath). In hindsight I could have been a little clearer. RFC 7540 addresses some of the issues under discussion in the most direct and succinct way I have read, compared to the other resources. I do appreciate the difference, however, one of the ways I have considered things here is to look at RFC 7540 section 9 in isolation; it does not seem to depend on any feature of HTTP/2, unless mux is an essential requirement of coalescing. Perhaps I am mistaken on that front. If it were theoretically possible to coalesce HTTP/1.1-over-TLS connections, the lack of mux could mean worse performance, however in my scenario the performance overhead comes from having to make a total 6 TLS handshakes. I appreciate that HTTP/2 cannot apply retroactively to HTTP/1.1, I don’t expect clients to work that way now but want to adjust my expectations to how (or in what way) they may work. Nevertheless,

On 09 December, Mike Bishop wrote:
> HTTP/1.1 doesn’t reuse connections across hostnames.

I tried to find a rule or definition to this effect, it would be helpful if you could link to a concrete example as that would neutralise any argument otherwise.

On 09 December, Patrick McManus wrote:
> I'd like to stress that 7540 not only talks about h2, but it talks about h2 connection reuse across origins. A connection in this parlance is the whole tcp/tls/alpn stack.

> so if you have an existing connection it may get reused for a different origin (subject to the rules in that section) e.g. to coalesce a request for img2 onto an existing connection to img1.. but if no connection is currently present the UA may connect and SNI to img2 and not try and reuse the tls session. Reusing the TLS session for that seems out of the scope of 7540 section 9.

Interesting explanation. So in my previous email I glossed over the fact that the client made a new TCP connection for each and every host. I guess my desire is for a connection in the parlance of tls/alpn, i.e. independent of the transport layer, especially when there is no active transport connection to latch onto. I appreciate there are more complexities, more information to store and lookup when preparing to create a connection, but it sounds like Chrome might already be doing something like this for QUIC. I’ll see if I can find out any more on that topic.

I’d also like to understand if people think that HTTP/1.1 should be frozen out of picking up such development. I’m not against having to use “protocol-next” is it brings benefits, however, that requires my scenario

> nonetheless I think its a reasonable thing to explore as mt referred to.. but in my mind we don't have standards coverage for it that I can think of.

Are you suggesting there should standards coverage developed for this? If so, what would the appropriate format and forum be?


From: Patrick McManus []
Sent: 09 December 2016 22:58
To: Martin Thomson <<>>
Cc: Lucas Pardue <<>>; HTTP Working Group <<>>
Subject: Re: Expectations for TLS session reuse

+1 to both mike and mt's response.

I'd like to stress that 7540 not only talks about h2, but it talks about h2 connection reuse across origins. A connection in this parlance is the whole tcp/tls/alpn stack.

so if you have an existing connection it may get reused for a different origin (subject to the rules in that section) e.g. to coalesce a request for img2 onto an existing connection to img1.. but if no connection is currently present the UA may connect and SNI to img2 and not try and reuse the tls session. Reusing the TLS session for that seems out of the scope of 7540 section 9.
nonetheless I think its a reasonable thing to explore as mt referred to.. but in my mind we don't have standards coverage for it that I can think of.

On Fri, Dec 9, 2016 at 9:19 AM, Martin Thomson <<>> wrote:
For Firefox at least, we key the session cache on the origin.  That
includes a broader definition than the simple scheme-host-port
definition of origin (for instance, we annotate things specially for
private browsing).  Any time this tuple doesn't match we don't even
find the session state.

We have had a few discussions about what it might take to do what you
describe.  It gets interesting when you combine this with 0-RTT.  I
think that we'd like to find a way to do this, but it's not simple.

For now, I think that the only way to guarantee resumption is to start
with the original name.

I think that Google have a hack of some sort in QUIC that lets them do
cross-origin resumption for their properties, but I don't know the

On 9 December 2016 at 02:02, Lucas Pardue <<>> wrote:
> Hello all,
> I have a query about the expectations for TLS session reuse that apply to
> HTTP user agents. I am bringing the query to this to the working group due
> to the consideration of the connection reuse topic captured in RFC 7540
> Section 9.1.1.
> The background to my question lies in a scenario that we have, where we have
> the set of hosts {<>, 1.<>, 2.<>, 3.
><>, 4.<>, 5.<>} that all resolve to the same IP
> address. All hosts can be accessed via HTTPS on port 443. The server
> software is configured to support TLS 1.2 only, with TLS session IDs only.
> The entry point into our scenario is<>, which provides a
> certificate with a subjectAlternateName that includes<> and
> *<>.
> Our test case in this scenario is making a sequence of HTTP/1.1 requests to
> the set of hosts, starting with<> and then moving through the
> hosts (in incrementing order). SNI is used and indicates the name of the
> host being requested at that time. We had some ideas on how a user agent
> might approach TLS session reuse in this test case. However, after searching
> across a range of sources, we were unable to find a definitive, simple
> answer.
> The majority of our testing is based on libcurl, and we have a thread on the
> curl-library mailing list that has led to us opening out the question here.
> Our first test round used a client built on libcurl/7.29.0 and NSS/3.19.1.<http://3.19.1.>
> This showed session reuse across the hosts, and the server software (nginx)
> was happy to process the requests.
> Our second test round, used a newer version of libcurl and a variety of SSL
> backends (NSS, OpenSSL, GnuTLS).  This showed no session reuse. Kamil Dudka
> pointed us to this Mozilla bug ticket as a possible cause of the change in
> behaviour.
> Out third test round used a recent version of Firefox. This showed no
> session reuse.
> It would seem the first test round is an anomaly. However, the subsequent
> tests only characterise what those implementations do, not what a TLS client
> could do in terms of session reuse. I guess my final question is, regardless
> of HTTP version, should we have any expectation of session reuse in our
> scenario (client permitting) or is this type of reuse not a “good thing” and
> therefore is not implemented for good reason?
> Regards
> Lucas

This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.