Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp575985rdb; Fri, 6 Oct 2023 11:47:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPmDiNLxkRnUcBWKzsdSqP5tNQH2TR4RCPuMoXPWNQ9BR8l1GKw1e8ev4uzsDFNUYO1hWo X-Received: by 2002:a9d:738b:0:b0:6bf:27b3:3d25 with SMTP id j11-20020a9d738b000000b006bf27b33d25mr8788919otk.37.1696618073666; Fri, 06 Oct 2023 11:47:53 -0700 (PDT) Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id a29-20020a637f1d000000b00578e7a37c45si4369609pgd.10.2023.10.06.11.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 11:47:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gwag2ccU; arc=fail (signature failed); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CAFD48184A95; Fri, 6 Oct 2023 11:47:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233109AbjJFSrd (ORCPT + 99 others); Fri, 6 Oct 2023 14:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbjJFSrb (ORCPT ); Fri, 6 Oct 2023 14:47:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71D1EED; Fri, 6 Oct 2023 11:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696618050; x=1728154050; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=AwihL76GIj+fmytdDU/wZh/Vy5GYSWiREuB1hcNUR6Y=; b=gwag2ccUsHk/OZrYIMCnRPDRVCHGEF/MdXB37j3HLphAtAlITnZB8Ub1 jDxe4exSgkxnoAqcv7nazaBCjv5f9mNLr/joyGzGfro8N3qNYD5712qmo nqAOBy22jIYGWzpcLS54rZOtK5U6BYhD//FuTrR98aNNJbBx+pw0RWH/6 9+QcF2t3xHfD/dhKBTd68K/QVI16yHG32z1rruzrUSsbtdYml8F//Ib3O gltCTYWVgfJU4I2XoPeuEghKMMW+TttlujEweqTpM+3aRmRRyZ6fQ/Exg GS4tbKh7kL9fnVEKHwFpj+yYkkYSJVmkKcWUxsCEA5FJIw1OnWnm7m1iU A==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="386638398" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="386638398" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 11:47:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="876037750" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="876037750" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga004.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Oct 2023 11:47:29 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 6 Oct 2023 11:47:29 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Fri, 6 Oct 2023 11:47:29 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 6 Oct 2023 11:47:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EpMF+VMCvPka7x2Rlv98breXaaxaCHlW8MulGrR+wyTi/j7kES/RZt/ngOkc3dCYTEr68zSNPhKeYz5Bjt9bM6P6d7NgBBnL4cnxsEcTmjwvhTJLiYXr429QaY+BPmJxveyWb5GuOEknHkbLRhA7cHU8M7V0HDuGFcSdNupkbyI3Eo6B23t57IXOOYAVVAfzvUcuuJAsodj5xe/x4aU3E1dBvgr1xSCZJnRo6VXi1g3cMImnFuBFDZqtpdB+spMwlrJtS5PtF96yMqQfSVYZkaZmDIsx1eT8USzbWXs2ux2pZ+7IgGQ/qNJg4gZbaosZUZ9UPg848ah4J7edZeZgbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wE1E42UqKpSzWYYReszqavI5Q/Nzmd6D3MkxQol1UkY=; b=BIBnptzK1EJHrLLC1R9RwUCwc4hl7z1EWjJ4yGPulMVj17svRYoBQ3BM1oMhznEI7hE4nxin/syH8DXKhGYAXtsuGgHWYmNkNBLt1gwqbIseHUnoCLIrv6f7gLkT9JRHNZSZArRO8PLb1EicylR4kJ7z/t+PR6x+7mNsGWL1elrlVV5O+lBVXJbEo22MQ0y1Gq9O/4GZb3TwgLg3dDoSLCJ/KU0ucP83yTl4C+nRyUC+0XBs0G7TYcFd73xDipDhIkelP9qEO75CDbVASERGQZP/Cy27FAvX8XjkLyCB50lofPvoIG9Pfo+hipKwjg1353OjqbpsqqqOs2c28Blj0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by MW4PR11MB6839.namprd11.prod.outlook.com (2603:10b6:303:220::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Fri, 6 Oct 2023 18:47:26 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::acb0:6bd3:58a:c992]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::acb0:6bd3:58a:c992%5]) with mapi id 15.20.6838.033; Fri, 6 Oct 2023 18:47:26 +0000 Date: Fri, 6 Oct 2023 11:47:22 -0700 From: Dan Williams To: Lukas Wunner , Bjorn Helgaas , "David Howells" , David Woodhouse , "Herbert Xu" , "David S. Miller" , Alex Williamson , , , , , , CC: Jonathan Cameron , , David Box , Dan Williams , Dave Jiang , "Li, Ming" , Zhi Wang , Alistair Francis , "Wilfred Mallawa" , Alexey Kardashevskiy , "Tom Lendacky" , Sean Christopherson , Alexander Graf Subject: RE: [PATCH 01/12] X.509: Make certificate parser public Message-ID: <6520563a5865f_ae7e729459@dwillia2-xfh.jf.intel.com.notmuch> References: Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: MW4P222CA0011.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::16) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|MW4PR11MB6839:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e17d1e2-34d2-45ec-5dce-08dbc69caf89 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MTsWjs7dlBgy0KuOXoQp8zwWZKfgE7zkfm+udJpN4t179AdMlFtN1TeSeMhp81RT0Kq848En5woK3D8+MlVylB68D8BBQtek28w8PimduJpLKsnPyo0+Lup+kCq1bh6Trp6zZhABETmGXemk7xyAPmgEP3V8SMY+kf3G5b1Qz0129ACCAnX28OQOxxQtl/ysiEqenQjCdu7/hXHAm0r0poWrkNuHhgGABt3ArmuP58nWEthsHC+TzlO2OWzb/Wlvb8ThbDi/kZVxqABVb1hOolofnvNncnMlo6cvRRGR/fqpb+70zXqqBbjmXvOlxRCodKEBCI3C3XH9OO/Qv9hRzzgnGxAIH/UYtAq0iCxnlcl5UFU8YtHQEmzjgleBasYcmo9f3lMr0Wlqa01lZTJ8f2TE4RND/hMNIFmnOhiedBUBQw8X3SZDKouC0yA43R8hT3cNCVwTkQfPoWGQfPQOFgW67j9SnQBIWk6edQh2+1+oKsXdv/4aqJdT/r6q1Sho0KV+HIHkj9iL3gnnExORcYIMmLk7acHyAWIPkMvy1lBCxYtDpuRMb0bp5DJhWkVKE43V5CWykAlXbE8w+hf0m1tiZFMPm6cyfRBDkJCNCxw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(136003)(346002)(376002)(39860400002)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(110136005)(66476007)(54906003)(316002)(38100700002)(41300700001)(66946007)(9686003)(6506007)(6512007)(2906002)(7416002)(83380400001)(26005)(6666004)(8676002)(82960400001)(4326008)(5660300002)(8936002)(66556008)(921005)(6486002)(86362001)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?7xM1oNkjSoC7JcBCjXenNOiaHblaHIjJkFOrjYx2TmMdnGRIpksSIo4wIn2z?= =?us-ascii?Q?Wl/brdVeD5X03XfvmQTTS8RlmdEyD64JojBzA4dkVoS7RIUsfIYKSUBhRYCH?= =?us-ascii?Q?1LyXcB9L3TSvQ2sfaGGDAll/SV8s+RMXvaAlTYNnrFILKK0zQvVGr23olix5?= =?us-ascii?Q?/KwbCfnfjJfYMY02gVLN7csS3oHEzMETaNkYx8JGrkm7YvOLQc+wEFwoDvFV?= =?us-ascii?Q?0sWuJLm2yB8ZXfVk7qN5xCSYkG1Ih7Vyjh1HWCD0sLKGC0P6m6brUbg/Ag8w?= =?us-ascii?Q?M8/Y8071OVR+an4CrfiL42bKaXQACh6PfBFi5PUU4ULCJ/OZtjIehmYQ44HS?= =?us-ascii?Q?7/gUovy9r9aKY9h7z67I02+WeUwa+hAZolOmT4Qdu9ybtrRbtMYZuLlMBwMp?= =?us-ascii?Q?/CzZTv30wFg/OOUzpMCoBCpLAF0bIgnpj6bc+21UIfe8Iw7xsizDNx8TGrXe?= =?us-ascii?Q?vwQdL4FxTRBLe+KkcY5u15oAvZDdlj1nZf6g6rAR97q/K1Ek9v7TKWt30yLe?= =?us-ascii?Q?K1eSlENTQNiDu9QWiZuYq3Durk8h9bGMC67/7wwe41iXjyLssK7xdN8cl5sX?= =?us-ascii?Q?n5KWNaslrUG0PxJMVGtbHMYjlL8f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IB1+1ovi3EihmUv4AgE4ZsR5EJRm1GP1JBfj5G/VKC30d4ZH9hwBunqFvxVL?= =?us-ascii?Q?LSc38O9/HAYf4feO1WnVAjJQRd409HnxI9E8npVBT78fhRH8IRzFVLcvCTl3?= =?us-ascii?Q?dA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0e17d1e2-34d2-45ec-5dce-08dbc69caf89 X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2023 18:47:26.6900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zaoqZkJ4WA9sjKYMx/e/VXdieZeYV9P5WAJ2UwlhQ2TX4xt6lHpoMhM9XBmrYqD1+MwtVzyvZmsip0mvsP8FfDwLag2zonePa3849lZCrs0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6839 X-OriginatorOrg: intel.com X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 11:47:39 -0700 (PDT) X-Spam-Level: ** Lukas Wunner wrote: > The upcoming support for PCI device authentication with CMA-SPDM > (PCIe r6.1 sec 6.31) requires validating the Subject Alternative Name > in X.509 certificates. > > High-level functions for X.509 parsing such as key_create_or_update() > throw away the internal, low-level struct x509_certificate after > extracting the struct public_key and public_key_signature from it. > The Subject Alternative Name is thus inaccessible when using those > functions. > > Afford CMA-SPDM access to the Subject Alternative Name by making struct > x509_certificate public, together with the functions for parsing an > X.509 certificate into such a struct and freeing such a struct. > > The private header file x509_parser.h previously included > for the definition of time64_t. That definition was since moved to > by commit 361a3bf00582 ("time64: Add time64.h header > and define struct timespec64"), so adjust the #include directive as part > of the move to the new public header file . > > No functional change intended. > > Signed-off-by: Lukas Wunner Looks good to me: Reviewed-by: Dan Williams