Re: [TLS] Regulations for EKU validation for CA certificates in the certificate chain

Viktor Dukhovni <ietf-dane@dukhovni.org> Sat, 28 January 2023 17:26 UTC

Return-Path: <ietf-dane@dukhovni.org>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2302CC14CF13 for <tls@ietfa.amsl.com>; Sat, 28 Jan 2023 09:26:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.897
X-Spam-Level:
X-Spam-Status: No, score=-6.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rWpqXKamczXk for <tls@ietfa.amsl.com>; Sat, 28 Jan 2023 09:26:29 -0800 (PST)
Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1BB16C14EB18 for <tls@ietf.org>; Sat, 28 Jan 2023 09:26:28 -0800 (PST)
Received: by straasha.imrryr.org (Postfix, from userid 1001) id 6EA3310F9A8; Sat, 28 Jan 2023 12:26:27 -0500 (EST)
Date: Sat, 28 Jan 2023 12:26:27 -0500
From: Viktor Dukhovni <ietf-dane@dukhovni.org>
To: tls@ietf.org
Message-ID: <Y9Vaw4m/wotIZPV2@straasha.imrryr.org>
Reply-To: tls@ietf.org
References: <CABXxEz-r0qZi6gmddm_1U-t-TLqyS0kbw+7p1xS0jPU7aKjjxg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABXxEz-r0qZi6gmddm_1U-t-TLqyS0kbw+7p1xS0jPU7aKjjxg@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/ChmZfyRIXeMUA_gaqjttbBPTcYQ>
Subject: Re: [TLS] Regulations for EKU validation for CA certificates in the certificate chain
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
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/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/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, 28 Jan 2023 17:26:33 -0000

On Sat, Jan 28, 2023 at 11:57:46AM +0200, Oleg Pekar wrote:

>   "If the extension is present, then the certificate MUST only be used
>    for one of the purposes indicated.  If multiple purposes are
>    indicated the application need not recognize all purposes indicated,
>    as long as the intended purpose is present.  Certificate using
>    applications MAY require that a particular purpose be indicated in
>    order for the certificate to be acceptable to that application.

Note, for the record, that OpenSSL does not require EKUs in CA
certificates, but *if* they're present, *then* the EKUs in the CA
certificate need to be compatible with the purpose to which the EE
certificate is used (e.g. TLS client or TLS server).

With Let's Encrypt DV TLS certificates the chain (sans root) looks like,
for example:

        Issuer: C=US, O=Let's Encrypt, CN=R3
        Subject: CN=dnssec-stats.ant.isi.edu
            X509v3 Extended Key Usage:
                TLS Web Server Authentication, TLS Web Client Authentication

        Issuer: C=US, O=Internet Security Research Group, CN=ISRG Root X1
        Subject: C=US, O=Let's Encrypt, CN=R3
            X509v3 Extended Key Usage:
                TLS Web Client Authentication, TLS Web Server Authentication

The EKUs on the "R3" intermediate (some prefer "subsidiary") CA are
clearly intended to express the purposes to which certificates it issues
can be put.  The "R3" certificate itself is not used for TLS connection
establishment.

In some configurations there's also a cross certificate from DST, which
has no EKUs:

        Issuer: O=Digital Signature Trust Co., CN=DST Root CA X3
        Subject: C=US, O=Internet Security Research Group, CN=ISRG Root X1

-- 
    Viktor.