Re: [TLS] RFC-4366-bis and the unrecognized_name(112) alert

Martin Rex <> Wed, 09 June 2010 18:14 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 47BFD3A68EA for <>; Wed, 9 Jun 2010 11:14:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -7.702
X-Spam-Status: No, score=-7.702 tagged_above=-999 required=5 tests=[AWL=-0.053, BAYES_50=0.001, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 27A2W3LXaA0R for <>; Wed, 9 Jun 2010 11:14:01 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 0A74D3A67B4 for <>; Wed, 9 Jun 2010 11:14:00 -0700 (PDT)
Received: from by (26) with ESMTP id o59IDwjw007273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Jun 2010 20:13:58 +0200 (MEST)
From: Martin Rex <>
Message-Id: <>
To: (Marsh Ray)
Date: Wed, 9 Jun 2010 20:13:57 +0200 (MEST)
In-Reply-To: <> from "Marsh Ray" at Jun 9, 10 12:26:49 pm
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Scanner: Virus Scanner virwal07
X-SAP: out
Subject: Re: [TLS] RFC-4366-bis and the unrecognized_name(112) alert
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: Wed, 09 Jun 2010 18:14:03 -0000

Marsh Ray wrote:
> On 6/9/2010 11:37 AM, Paul Hoffman wrote:
> > 
> > This is definitely more understandable than earlier revs. However,
> > there is still not enough definitive wording. I propose:
> > 
> > The ServerNameList MUST NOT contain more than one name of the same 
> > name_type.  If the server understood the ClientHello extension but 
> > does not recognize the server name, the server SHOULD take one of
> > two actions: abort the handshake by sending a fatal 
> > unrecognized_name(112) alert, or continue the handshake using a 
> > default credential.
> Is it necessary to specify that the continued handshake SHOULD "use a
> default credential"? TLS doesn't really require handshakes to use
> credentals after all.

The purpose of the server_name extension is to allow the server to
choose a server credential that is going to pass the client's
server endpoint identification check.

And even when DH_anon cipher suites are used, there certainly is a
"credential" involved, it just is not associated with any name.

> Perhaps this is extraneous overspecification?

I don't think so.  It makes a nicer fit with the (new) later text
describing the server endpoint identification performed by the
client application.

> If not, perhaps some clarification of the meaning of this term
> "default credential" would be helpful. I'm not sure if this is what was
> meant, but one possible rewording might be "or continue the handshake as
> if the client had not specified a server_name extension."

Personally, I would be fine with RECOMMENDing that the server should
behave as if it did not receive the extension all in the case that
it does not recognize the server_name.  Doing this improves robustness
(principle of least surprises).  But I don't know how others feel
about this.

> > Sending a warning-level alert such as 
> > unrecognized_name(112), but continuing the handshake, is NOT 
> > RECOMMENDED because the client's expected behavior in response to 
> > this is unpredictable.
> I accept that I may be in the minority on this (I honestly don't see why
> this case shouldn't be considered grounds for outright handshake
> failure). Still, as a guy who writes app code on the client side, the
> server side, and sometimes in between it seems to me like what we're
> calling "unpredictable client behavior" here is really the effect of
> conscious design decisions that made by implementers of TLS libraries
> and client application code.

Admittedly, "unpredictable" sounds slighlty strange, although it
matches reality.  For the server, there are roughly two kind of
"visible" client reactions when sending a warning-level alert
unrecognized_name(112).   Either the client aborts the handshake
(with or without sending a fatal alert), or the client continues
the handshake.

However, when the server decides to continue the handshake then it
wouldn't be very helpful if the client chokes on a warning-level
alert unrecognized_name(112) and aborts the handshake.

> So if a modern SNI-aware client wishes to abort the handshake on
> receiving the name mismatch warning, is it really appropriate for the
> revised spec to attempt to defeat that by saying the server should
> withhold this information from the client and the warning SHOULD NOT be
> sent at all?

IMHO yes.  A TLS client implementation that aborts receiving a
warning-level unrecognized_name(112) alert is defective.  
It is the duty of the client application to determine whether
to abort the handshake (and/or communication) when the server
endpoint identification fails.