Re: [TLS] Questions about TLS Server Name Indication extension

Nelson B Bolyard <> Fri, 30 October 2009 04:36 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 91B123A69C5 for <>; Thu, 29 Oct 2009 21:36:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.73
X-Spam-Status: No, score=-2.73 tagged_above=-999 required=5 tests=[AWL=-0.731, BAYES_00=-2.599, J_CHICKENPOX_55=0.6]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id QlXfLwn0+Y5k for <>; Thu, 29 Oct 2009 21:36:33 -0700 (PDT)
Received: from ( []) by (Postfix) with SMTP id BC3A13A6970 for <>; Thu, 29 Oct 2009 21:36:33 -0700 (PDT)
Received: (qmail 28307 invoked from network); 30 Oct 2009 04:36:44 -0000
Received: from unknown ( by ( with ESMTP; 30 Oct 2009 04:36:44 -0000
Message-ID: <>
Date: Thu, 29 Oct 2009 21:36:43 -0700
From: Nelson B Bolyard <>
Organization: Network Security Services
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1b1pre) Gecko/20081004 NOT Firefox/2.0 SeaMonkey/2.0a2pre
MIME-Version: 1.0
References: <>
In-Reply-To: <>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Subject: Re: [TLS] Questions about TLS Server Name Indication extension
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 30 Oct 2009 04:36:34 -0000

On 2009-10-28 17:04 PDT, Michael Gray wrote:
> <> wrote:
>> Consider this scenario:
>> Physical host has two virtual hosts, A and B.
>> First handshake:
>>   client sends SNI with host name A, empty session ID.
>>   server does full handshake, session ID 1.
>> Second handshake (renegotiation):
>>   client sends SNI with host name B and session ID 1,
>> Session ID 1 implicitly identifies host A.
>> The server could
>> A)  Honor the session ID and ignore the SNI.
>> B)  Compare the host name in the SNI with the host name for session ID 1,
>>     observe the mismatch, and do a new FULL handshake for host B.
>> C)  Compare the host name in the SNI with the host name for session ID 1,
>>     observe the mismatch, and return a fatal error alert.
>> RFC 5246 seems to suggest choice A.  It says:
>>    Most current TLS extensions are relevant only
>>    when a session is initiated: when an older session is resumed, the
>>    server does not process these extensions in Client Hello, and does
>>    not include them in Server Hello.
>> But I tend to lean towards choice B myself.
>> What do other SNI server implementations do in this case?
> A for IBM native SSL.  The Client SNI data is only processed if the session
> can NOT be resumed.
> Also as an answer to the previous question; we only consider that the
> Client has sent a single name in Client SNI request.

Thanks, Mick, for those concise answers.  Sadly, I don't sense that we
have a consensus from among the responses yet, except on the point that
the SNI client hello should only contain one name of each type.

I think that interoperability demands that we standardize these answers.

I predict that we'll end up with these below(which I think match yours)
but I fear that existing implementations differ from these a fair bit.

- Only one name per type is allowed and used in the client hello SNI.

- The session ID space covers all the sessions for the entire physical host
including all the virtual hosts, so by itself, the session ID contains all
the information necessary to determine which virtual host uses the session
with that ID.  It is not necessary to consult the SNI host name to know
which virtual host's session cache to examine to find the session ID.

- The SNI extension is ignored if the session can be resumed based on the
session ID, and no matching/checking is done to ensure that the SNI host
name matches the name in the resumed session, when the session is resumed.

> Also on previous note <snip> 'because they don't want to send the client
> cert over the wire in the clear" <snip>
> For what reason would you require a client cert or a host name or a host
> certificate to be not treated as public information?  

I don't know.  I work on NSS, an open source TLS library that is used in
lots of applications and is discussed in an open mailing list and newsgroup
(  One of the application developers who uses NSS
has this issue, but I don't know why.  I'd guess it's the usual extreme
security p\a\r\a\n\o\i\a\ precautions that have kept me employed. :)

> Mick Gray