Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22E49C433FE for ; Sat, 27 Nov 2021 00:45:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344277AbhK0Ase (ORCPT ); Fri, 26 Nov 2021 19:48:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343788AbhK0Aqd (ORCPT ); Fri, 26 Nov 2021 19:46:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E85F3C06175D; Fri, 26 Nov 2021 16:43:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 80A97B82958; Sat, 27 Nov 2021 00:43:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C93DC004E1; Sat, 27 Nov 2021 00:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637973797; bh=VjGdawolzHACJokhOF749JVacumNKAm7ctN8SJsDFQs=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=j83vBPHjzoi+5z+QBNC5xCGaH6OX0DbYWUS/IXK6DMhcvWeVvHv0LcGlcvQnEFaqV KLzquPPaHtXHmtBg64OHfG1wDnCcfidjQfMWKp3neSiqIDd/7XjCazdNPcocRGGb/D Bel3MZD0DBdUmCDyjXr4SxteS9e7oJ4ZJZF8/olXg/5QRNyitHf3tJscfDTH5HuKWl W2p31LZWBZlXOPmbHtziqb5SvgHfPTEuoyz9pRVQNRm6BWFfIoBoh8dDpGmj14Pk90 XMJGACfOeZtZNENBgNeMRGLBCjy1RLDFjAZtw5PCfT39U8tyCuXXBxWD6EKoCLKN+G EKKWBZ5cXSk5Q== Message-ID: <8f64f76e81a3e50118d0d332d43e78e9b89e2bd8.camel@kernel.org> Subject: Re: [PATCH v8 05/17] X.509: Parse Basic Constraints for CA From: Jarkko Sakkinen To: Eric Snowberg , keyrings@vger.kernel.org, linux-integrity@vger.kernel.org, zohar@linux.ibm.com, dhowells@redhat.com, dwmw2@infradead.org, herbert@gondor.apana.org.au, davem@davemloft.net, jmorris@namei.org, serge@hallyn.com Cc: keescook@chromium.org, torvalds@linux-foundation.org, weiyongjun1@huawei.com, nayna@linux.ibm.com, ebiggers@google.com, ardb@kernel.org, nramas@linux.microsoft.com, lszubowi@redhat.com, jason@zx2c4.com, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-efi@vger.kernel.org, linux-security-module@vger.kernel.org, James.Bottomley@HansenPartnership.com, pjones@redhat.com, konrad.wilk@oracle.com Date: Sat, 27 Nov 2021 02:43:14 +0200 In-Reply-To: <20211124044124.998170-6-eric.snowberg@oracle.com> References: <20211124044124.998170-1-eric.snowberg@oracle.com> <20211124044124.998170-6-eric.snowberg@oracle.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 User-Agent: Evolution 3.40.4-1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org T24gVHVlLCAyMDIxLTExLTIzIGF0IDIzOjQxIC0wNTAwLCBFcmljIFNub3diZXJnIHdyb3RlOgo+ IFBhcnNlIHRoZSBYLjUwOSBCYXNpYyBDb25zdHJhaW50cy7CoCBUaGUgYmFzaWMgY29uc3RyYWlu dHMgZXh0ZW5zaW9uCj4gaWRlbnRpZmllcyB3aGV0aGVyIHRoZSBzdWJqZWN0IG9mIHRoZSBjZXJ0 aWZpY2F0ZSBpc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