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

Michael D'Errico <mike-list@pobox.com> Sat, 31 October 2009 02:11 UTC

Return-Path: <mike-list@pobox.com>
X-Original-To: tls@core3.amsl.com
Delivered-To: tls@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 33FC33A67FC for <tls@core3.amsl.com>; Fri, 30 Oct 2009 19:11:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.579
X-Spam-Level:
X-Spam-Status: No, score=-2.579 tagged_above=-999 required=5 tests=[AWL=0.020, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WYC3m+FtD9kU for <tls@core3.amsl.com>; Fri, 30 Oct 2009 19:11:08 -0700 (PDT)
Received: from sasl.smtp.pobox.com (a-pb-sasl-sd.pobox.com [64.74.157.62]) by core3.amsl.com (Postfix) with ESMTP id 0ED943A6781 for <tls@ietf.org>; Fri, 30 Oct 2009 19:11:06 -0700 (PDT)
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 208B28CE46 for <tls@ietf.org>; Fri, 30 Oct 2009 22:11:24 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; 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; d=pobox.com; 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 a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 1B6828CE45 for <tls@ietf.org>; Fri, 30 Oct 2009 22:11:24 -0400 (EDT)
Received: from administrators-macbook-pro.local (unknown [24.234.114.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 537E18CE44 for <tls@ietf.org>; Fri, 30 Oct 2009 22:11:22 -0400 (EDT)
Message-ID: <4AEB9D27.5090203@pobox.com>
Date: Fri, 30 Oct 2009 19:12:55 -0700
From: Michael D'Errico <mike-list@pobox.com>
User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812)
MIME-Version: 1.0
To: tls@ietf.org
References: <200910292246.n9TMk6sZ014367@fs4113.wdf.sap.corp>
In-Reply-To: <200910292246.n9TMk6sZ014367@fs4113.wdf.sap.corp>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Pobox-Relay-ID: B059DA80-C5C2-11DE-ABBD-A67CBBB5EC2E-38729857!a-pb-sasl-sd.pobox.com
Subject: Re: [TLS] Questions about TLS Server Name Indication extension
X-BeenThere: tls@ietf.org
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." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=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.

Mike