From patchwork Fri Jun 27 12:18:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SCHNEIDER Johannes X-Patchwork-Id: 65732 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 aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF4FBC83010 for ; Fri, 27 Jun 2025 12:18:46 +0000 (UTC) Received: from DU2PR03CU002.outbound.protection.outlook.com (DU2PR03CU002.outbound.protection.outlook.com [52.101.65.12]) by mx.groups.io with SMTP id smtpd.web10.12238.1751026720819086532 for ; Fri, 27 Jun 2025 05:18:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@leica-geosystems.com header.s=selector1 header.b=BadEngxo; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: leica-geosystems.com, ip: 52.101.65.12, mailfrom: johannes.schneider@leica-geosystems.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=P2TrzVqPgpU3u73xjngDalhhvhsBkvojjNCuCfH1a6mh9yvkZzHxUUla0GDrWFybiNRret8KsN+YnUQGaYOQ5p/3GLb57j4ZSPQhUd4vVG9hmVl8yRr/gyatD+9ogxVE2R9FnRhX8jGWd3wd8IlhDLYcq9fKE5t4fmWQ9vXWaZHqif4S8Wvem0BgEgqR/7pEUu7zPzxd6nIzRMlpQ1rm8hWYCeSlO7Wg/QJOpGR2NnZjQG3IXUV3FUcY/PYymOGn1OMutAGATlVXtu0ya0kcZRJhln042A6pq85PaKghkeRwJWkPhOvbvFZY0pUUBZNaaPgwXCmIp3d2zD07ClPsFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/Pz0KBrpt6XhOwefffJ9Z2noBIDY+W4HKY9YWrIQcFI=; b=vAcuSqBRyUsk5dEbAPzueQWe76m9ghfhJxJPJ/DJgeMIpltLFXNT+Qymj3hHkFgDCtdsnJSA6ItytFfNWLFQCfotAc7Orfb8ySQB1M7dhz30DzoaScZsGYgKVD96/usJnrAFxdEAsHrdZSjyJtCanKVmV8jURR4IsufhS/OuWls4O457sVm6hI+VaZxwdPeAQQY3NmJRDLcdUwe6jYPvkwCNvgz3/PSjL7sw0+VrEeeiovDP3qaHGIu2jkOISCKjQuJAPaz7ZKisXlnorLoS70b/kwoiUiJgOjZBkMKdXj0fwMQ47iJZY/1SxylLYi0uZhcvq6x5S55SGsExG3C90Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=lists.openembedded.org smtp.mailfrom=leica-geosystems.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/Pz0KBrpt6XhOwefffJ9Z2noBIDY+W4HKY9YWrIQcFI=; b=BadEngxogDWcR8mGGPxtkW1zEiF2V9sQWvouMLq4jnKj+B+lfTP4hedHRMelAaNHNJLyW6CgiTgK53G7It5SFP2YWf7jc9JoJ7dM1KV/X3J+WVLGNnihKkqSmzVB1k9GTjf2eJAXqhAi0zqKOfrfQKIlnMhuHiOTwDU/bUNi+is= Received: from ZR0P278CA0006.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:16::16) by AM9PR06MB7284.eurprd06.prod.outlook.com (2603:10a6:20b:2d0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.16; Fri, 27 Jun 2025 12:18:37 +0000 Received: from DU6PEPF0000B620.eurprd02.prod.outlook.com (2603:10a6:910:16:cafe::4c) by ZR0P278CA0006.outlook.office365.com (2603:10a6:910:16::16) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8880.16 via Frontend Transport; Fri, 27 Jun 2025 12:18:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by DU6PEPF0000B620.mail.protection.outlook.com (10.167.8.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.14 via Frontend Transport; Fri, 27 Jun 2025 12:18:37 +0000 Received: from [127.0.1.1] ([10.60.34.121]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Fri, 27 Jun 2025 14:18:31 +0200 From: Johannes Schneider Date: Fri, 27 Jun 2025 14:18:22 +0200 Subject: [PATCH meta-oe v4 6/6] signing.bbclass: remove signing_import_cert_chain_from_pem MIME-Version: 1.0 Message-Id: <20250627-signing-set-ca-v4-6-b8fe358664c6@leica-geosystems.com> References: <20250627-signing-set-ca-v4-0-b8fe358664c6@leica-geosystems.com> In-Reply-To: <20250627-signing-set-ca-v4-0-b8fe358664c6@leica-geosystems.com> To: jlu@pengutronix.de Cc: bsp-development.geo@leica-geosystems.com, openembedded-devel@lists.openembedded.org, raj.khem@gmail.com, Johannes Schneider X-Mailer: b4 0.13.0 X-OriginalArrivalTime: 27 Jun 2025 12:18:31.0505 (UTC) FILETIME=[988F1410:01DBE75D] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU6PEPF0000B620:EE_|AM9PR06MB7284:EE_ X-MS-Office365-Filtering-Correlation-Id: 7cbb921a-1429-4c11-fef3-08ddb574be71 X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xZlYXolN1YUCUmtFVM7xjiQ8LzCk265?= =?utf-8?q?CgKqAYJyVEv1xFYEAXK8KVHFOilJJ/zoNT7aWvibDPkVCwvF3io5ViAcbJynyHkrW?= =?utf-8?q?YrMZAOJAaG5ufNCECLrDv29FLRuvRL+uLSGFKlNpK1sUDDoRRY09MPHXiRjfZ3M0A?= =?utf-8?q?iSFv7UCjnoV2EzRiZbGbynd6/Mo700NfcsIj+CauBpf2rEUjfqDKqd2NTkAWz4V0C?= =?utf-8?q?1zeM0uR43v8gfWokido83SYdkGwcEFu+zTDSiu5y3YTQ7hKXP1wVexCpqPdY0GuC2?= =?utf-8?q?YGp7JzRYMD27VddR7JRKLnpynJ7kLPkrEIhYKJBBPgdJNjWhuu4MMISRnTHWCFq+y?= =?utf-8?q?CrYaSQ7Sh/6mZDqZJY/BWHg2i4lLS2KPEmSiErNghWvaLV3tk8KuL+QmZCSUcqsRX?= =?utf-8?q?h4S+OtopO/k4AwPtYdwohnAnXy+esyR7hr5Vez4jVHz4/hIo8nikgYsYH0RpC29vp?= =?utf-8?q?AusCKP8SCaTFv8sI8NAnh3JzcN7W8IWx9p2MBbYb+cQ3FZ1I8LnVSPNpbzwfg4cz1?= =?utf-8?q?q7tvCJFRR4UXntGXHWEjd8Xg7YuJT9JvZehvoCwcYDJi3nrRmVF+9s2RzTlMKjE/q?= =?utf-8?q?+JDJSQTvvN1E/rVijakf2L9cyUrwiv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Antispam-Report: CIP:193.8.40.94;CTRY:CH;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:hexagon.com;PTR:ahersrvdom50.leica-geosystems.com;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: leica-geosystems.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2025 12:18:37.1820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7cbb921a-1429-4c11-fef3-08ddb574be71 X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a;Ip=[193.8.40.94];Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF0000B620.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR06MB7284 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 27 Jun 2025 12:18:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/118153 With the now available set|get|has_ca functions to establish a CA link between roles during their import, the signing_import_cert_chain_from_pem can now be removed. As it had the shortcoming of dynamically creating roles, which are harder to handle then the manually/specifically setup CA roles. This effectively reverts: a825b853634 signing.bbclass: add certificate ca-chain handling Reviewed-by: Jan Luebbe Signed-off-by: Johannes Schneider --- meta-oe/classes/signing.bbclass | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git meta-oe/classes/signing.bbclass meta-oe/classes/signing.bbclass index 6fde22bf22..5068360ca7 100644 --- meta-oe/classes/signing.bbclass +++ meta-oe/classes/signing.bbclass @@ -231,35 +231,6 @@ signing_get_root_cert() { echo "${cert_name}" } -# signing_import_cert_chain_from_pem -# -# Import a certificate *chain* from a PEM file to a role. -# (e.g. multiple ones concatenated in one file) -# -# Due to limitations in the toolchain: -# signing class -> softhsm -> 'extract-cert' -# the input certificate is split into a sequentially numbered list of roles, -# starting at _1 -# -# (The limitations are the conversion step from x509 to a plain .der, and -# extract-cert expecting a x509 and then producing only plain .der again) -signing_import_cert_chain_from_pem() { - local role="${1}" - local pem="${2}" - local i=1 - - cat "${pem}" | \ - while openssl x509 -inform pem -outform der -out ${B}/temp_${i}.der; do - signing_import_define_role "${role}_${i}" - signing_pkcs11_tool --type cert \ - --write-object ${B}/temp_${i}.der \ - --label "${role}_${i}" - rm ${B}/temp_${i}.der - echo "imported ${pem} under role: ${role}_${i}" - i=$(awk "BEGIN {print $i+1}") - done -} - # signing_import_cert_from_pem # # Import a certificate from PEM file to a cert_name.