Re: [TLS] Verifying X.509 Certificate Chains out of order

Dr Stephen Henson <lists@drh-consultancy.demon.co.uk> Mon, 06 October 2008 12:07 UTC

Return-Path: <tls-bounces@ietf.org>
X-Original-To: tls-archive@ietf.org
Delivered-To: ietfarch-tls-archive@core3.amsl.com
Received: from [127.0.0.1] (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 307053A6AB0; Mon, 6 Oct 2008 05:07:15 -0700 (PDT)
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 A2BD128C0D7 for <tls@core3.amsl.com>; Mon, 6 Oct 2008 05:07:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[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 wH7PBpvENGUI for <tls@core3.amsl.com>; Mon, 6 Oct 2008 05:07:12 -0700 (PDT)
Received: from relay12.mail.uk.clara.net (relay12.mail.uk.clara.net [80.168.70.192]) by core3.amsl.com (Postfix) with ESMTP id 67C613A6A76 for <tls@ietf.org>; Mon, 6 Oct 2008 05:07:12 -0700 (PDT)
Received: from drh-consultancy.demon.co.uk ([80.177.30.10]:49431 helo=[192.168.7.8]) by relay12.mail.uk.clara.net with esmtpa (plain:drh) (Exim 4.69) (envelope-from <lists@drh-consultancy.demon.co.uk>) id 1Kmoqz-0004pG-Tw; Mon, 06 Oct 2008 13:07:02 +0100
Message-ID: <48E9FF47.2010503@drh-consultancy.demon.co.uk>
Date: Mon, 06 Oct 2008 13:06:31 +0100
From: Dr Stephen Henson <lists@drh-consultancy.demon.co.uk>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
References: <E1Kmme1-0007As-9b@wintermute01.cs.auckland.ac.nz>
In-Reply-To: <E1Kmme1-0007As-9b@wintermute01.cs.auckland.ac.nz>
X-Enigmail-Version: 0.95.7
X-Clara-Relay: Message sent using Claranet Relay Service using auth code: drh
Cc: simon@josefsson.org, tls@ietf.org
Subject: Re: [TLS] Verifying X.509 Certificate Chains out of order
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-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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tls-bounces@ietf.org
Errors-To: tls-bounces@ietf.org

Peter Gutmann wrote:
> Simon Josefsson <simon@josefsson.org>; writes:
> 
>> It is claimed that OpenSSL, IE and Firefox does not enforce the second
>> MUST in the paragraph above, and succeeds in verifying an
>> out-of-sequence chain.  I haven't verified the claim.  It appears as if
>> the OpenSSL developers don't consider their behaviour as a bug (see
>> reply below).
> 
> Add cryptlib to the list of implementations that don't care about the order. 
> In fact I'd be kinda surprised if anyone (well, apart from GnuTLS) cared about 
> cert order.
> 

OpenSSL does verify chains out of order and indeed incomplete chains if
appropriate certificates are trusted.

I would say though that particular server is misconfigured.

>> What are others opinion on this?  I'm looking for some guidance on
>> whether we should modify our current behaviour.
> 
> I'd say modify it, in fact I'm not sure what the rationale for requiring 
> ordering was in the original spec, "it's tidier that way" doesn't strike me as 
> a good argument :-).
> 

This raises a point I've wondered about for a while... Various PKIX
standards allow more than one chain between a root and EE certificate
(cross certification et al) so the (possibly almost) complete one a
server presents may not be the one a client will trust. CRLs can have
distinct paths too.

The wording in the specs (to me at least) implies one unique validation
path.

The CMS standards for example don't have the ordering requirement they
merely allow a set of "useful certificates" which may contain more or
less certificates than necessary to build a chain.

Steve.
-- 
Dr Stephen N. Henson.
Core developer of the   OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.co.uk/
Email: shenson@drh-consultancy.co.uk, PGP key: via homepage.

_______________________________________________
TLS mailing list
TLS@ietf.org
https://www.ietf.org/mailman/listinfo/tls