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

Michael D'Errico <> Sat, 31 October 2009 02:11 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 33FC33A67FC for <>; Fri, 30 Oct 2009 19:11:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.579
X-Spam-Status: No, score=-2.579 tagged_above=-999 required=5 tests=[AWL=0.020, BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id WYC3m+FtD9kU for <>; Fri, 30 Oct 2009 19:11:08 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 0ED943A6781 for <>; Fri, 30 Oct 2009 19:11:06 -0700 (PDT)
Received: from (unknown []) by (Postfix) with ESMTP id 208B28CE46 for <>; Fri, 30 Oct 2009 22:11:24 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sasl; bh=DAxeoGLIGLqn 5kXW1/QrPUBk/6k=; b=JWZW/nLspNFJ0OIS/kXFdE72IBFq+A4tASQmz/UJr634 9GjrHiH33a92wz8iTmt7d7rZeETFaRv4QHRnigrfeVMdh30Y+WSZL9E3OOYwDQLm BHLOzqRH8CEGaq70yb7R1TJF2Adh/IuzVJTt1X8mlibDA0vxnnn9h5CgyMupjp0=
DomainKey-Signature: a=rsa-sha1; c=nofws;; h=message-id:date :from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=UZZELD 3hx7fanKt8eBzZEHlC/bhCUS+HCKnuAl8kDAG8iAofLTd7mY6ljxvE8EEPHFolDb 8F6RVegbisuSUoXRBRu1P5Zk/TOw0fqKU0/DfTnrumOp+ypQ9v68mqi7uQxSsYAX OcjEJnnqaLlEHAkrVaSF/zE/A5IPp8nTFF430=
Received: from (unknown []) by (Postfix) with ESMTP id 1B6828CE45 for <>; Fri, 30 Oct 2009 22:11:24 -0400 (EDT)
Received: from administrators-macbook-pro.local (unknown []) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id 537E18CE44 for <>; Fri, 30 Oct 2009 22:11:22 -0400 (EDT)
Message-ID: <>
Date: Fri, 30 Oct 2009 19:12:55 -0700
From: Michael D'Errico <>
User-Agent: Thunderbird (Macintosh/20090812)
MIME-Version: 1.0
References: <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: B059DA80-C5C2-11DE-ABBD-A67CBBB5EC2E-38729857!
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: Sat, 31 Oct 2009 02:11:09 -0000

> Btw. RFC-4366 doesn't say what to do about IP-Addresses.  Since
> rfc-2818.txt indicates that Server certificates may contain
> SANs of the type iPAddress, sending IP-Addresses also via SNI
> sounds like the way to go when e.g. the Browser tries to open
> a URL with only an IPaddress instead of a hostname..

RFC 4366 says on page 10:

    Literal IPv4 and IPv6 addresses are not permitted in "HostName".

A new name type would need to be created for IP addresses.

> There are much more interesting questions: when a TLS session in the
> cache was originally established with protocol version 0x03,0x01
> what about a client resume proposal with a protocol version 0x03.0x00
> or 0x03,0x02 in the client_version of the ClientHello?

I looked at my code and found that when a cached session is
retrieved, the ClientHello.version of the new handshake is compared
to the negotiated version of the original session.  If they are not
equal, then a full handshake is performed.

But that brings up a subtle point.  What if the client originally
connected offering a higher version than I support?  When it tries
to resume a session, should it use the version it originally sent
in the ClientHello, or the lower version that was negotiated?

I would think that the client should be allowed to specify the same
version number it originally connected with.

I searched through RFC 5246 but could not find a discussion of this.
Did I miss it?  What do others think should happen?

> A TLS client should *NEVER* make assumptions about independent
> servers (i.e. independent ServerNames) sharing a TLS session cache.
> Sensible TLS clients should NOT assume that TLS servers on different
> ports of the same host share the TLS session cache (or credentials
> or any other TLS characteristics, for that matter).

A somewhat related problem I encountered is that Google's search
engine assumes that the content at http port 80 is the same as the
content at https port 443.  I was having trouble getting my site
indexed because the text/plain page from my TLS test server was
being treated as my home page by Google's bot, i.e. with no links.
I don't know if other search engines exhibit this behavior.