From patchwork Thu Aug 17 05:48:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 714387 Delivered-To: patch@linaro.org Received: by 2002:a5d:4012:0:b0:317:ecd7:513f with SMTP id n18csp2739924wrp; Wed, 16 Aug 2023 22:50:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKzdJDVjfMsv/EvY8jRHlnUfbyM9p8B33t2Am/ihyhF/FjSY2x8bgc1oofyEAk7tswURib X-Received: by 2002:adf:ed05:0:b0:317:7362:3fe8 with SMTP id a5-20020adfed05000000b0031773623fe8mr3226225wro.9.1692251400783; Wed, 16 Aug 2023 22:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692251400; cv=none; d=google.com; s=arc-20160816; b=WhdkeEv1ylV8kZkv6j4QOYgj6Lv3LG7qb12LuvfFmYGJ1rT7ffyu6Plg/zOYqRlVR+ du3LWycf1qhX6DEMkuvlb6Lz/fR4NkhGqhHrPDNY99attTn6sfjQoHddoatmol4jbPwo FhkzYZHHnr3jje0Y2+wmMvgLd2wyFnkmJmvR1MRLSlvIzc1/v93uKILmLjpp8zPvT54U PaMEUz0G1WkgXsqewJfQ1w2wKL1ZNtM2KnEHyqo9/ob2QYxEF2pIiuCCqNjKkzdcZFai WF7Lh7r+eDq+IkLpWpTyqaKPakRDFo2urO1aTGOkNsNDTqZx/JEx2WAcyHc8+THroo/5 15lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=zuEGMyKBiQ6G27Wd+ypOZ6gJc1z6ThU9vLfLj2Wzx/E=; fh=ikJSK2WVWLZPtKfyjzYjMbDKcRMYT5CY2x/iGdlGnWY=; b=JjtruL4D5x6lEQ8KeIoKUz4QMIURkFIfEV2wTIW8QiQvlHVzsHwzCCsX9dgioX35gT G5ELByrVLLsSnzaQBdjQXsq4SEhwTs+SbGyGj4vaW7+GepW4XMK5cHLSKVXuYaP8wpGt AzG4m5r7wuf91vQXKvrendC/TnqIq/tG929B89Dcr93aN+7GlXcojmZ6PuZiOMgoBcuQ EvrJG8hHGANCXcKrIZ6zC0BmCSF15al0hFo9RihR9nYXZ4BDL36I2XRXpGROSSnvYXZw SRreleK+/lG6KbwhiBKqThzP2GS0L/qngbK+pMOi1EmoHeCgIuKJizYMn5NXedjsLhVL hltw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id k11-20020adff28b000000b0031a2487a14esi1910929wro.994.2023.08.16.22.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 22:50:00 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ADC6486A68; Thu, 17 Aug 2023 07:49:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5D2A686A8E; Thu, 17 Aug 2023 07:49:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 89E8286979 for ; Thu, 17 Aug 2023 07:49:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C9E5AD75; Wed, 16 Aug 2023 22:50:05 -0700 (PDT) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.46.7]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9E4BB3F762; Wed, 16 Aug 2023 22:49:22 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Tom Rini , Sughosh Ganu Subject: [PATCH v2 5/6] test: capsule: Remove logic to add public key ESL Date: Thu, 17 Aug 2023 11:18:55 +0530 Message-Id: <20230817054856.2019253-6-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230817054856.2019253-1-sughosh.ganu@linaro.org> References: <20230817054856.2019253-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The public key EFI Signature List(ESL) needed for capsule authentication is now embedded into the platform's DTB as part of the build. Remove the superfluous logic from the test setup. Signed-off-by: Sughosh Ganu --- Changes since V1: None test/py/tests/test_efi_capsule/conftest.py | 28 +++++--------------- test/py/tests/test_efi_capsule/signature.dts | 10 ------- 2 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 test/py/tests/test_efi_capsule/signature.dts diff --git a/test/py/tests/test_efi_capsule/conftest.py b/test/py/tests/test_efi_capsule/conftest.py index 7eead9bc64..67761a9708 100644 --- a/test/py/tests/test_efi_capsule/conftest.py +++ b/test/py/tests/test_efi_capsule/conftest.py @@ -49,33 +49,19 @@ def efi_capsule_data(request, u_boot_config): check_call('cp %s/capsule_pub_key_bad.crt %s/SIGNER2.crt' % (key_dir, data_dir), shell=True) - # Update dtb adding capsule certificate - check_call('cd %s; ' - 'cp %s/test/py/tests/test_efi_capsule/signature.dts .' - % (data_dir, u_boot_config.source_dir), shell=True) + if capsule_auth_enabled: check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o signature.dtbo signature.dts; ' - 'fdtoverlay -i %s/arch/sandbox/dts/test.dtb ' - '-o test_sig.dtb signature.dtbo' + 'cp %s/arch/sandbox/dts/test.dtb test_sig.dtb' % (data_dir, u_boot_config.build_dir), shell=True) - # Update dtb to add the version information check_call('cd %s; ' 'cp %s/test/py/tests/test_efi_capsule/version.dts .' % (data_dir, u_boot_config.source_dir), shell=True) - if capsule_auth_enabled: - check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' - 'fdtoverlay -i test_sig.dtb ' - '-o test_ver.dtb version.dtbo' - % (data_dir), shell=True) - else: - check_call('cd %s; ' - 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' - 'fdtoverlay -i %s/arch/sandbox/dts/test.dtb ' - '-o test_ver.dtb version.dtbo' - % (data_dir, u_boot_config.build_dir), shell=True) - + check_call('cd %s; ' + 'dtc -@ -I dts -O dtb -o version.dtbo version.dts; ' + 'fdtoverlay -i %s/arch/sandbox/dts/test.dtb ' + '-o test_ver.dtb version.dtbo' + % (data_dir, u_boot_config.build_dir), shell=True) check_call('cp %s/u-boot_bin_env.itb %s ' % (u_boot_config.build_dir, data_dir), shell=True) check_call('cp %s/Test* %s ' % (u_boot_config.build_dir, data_dir), shell=True) diff --git a/test/py/tests/test_efi_capsule/signature.dts b/test/py/tests/test_efi_capsule/signature.dts deleted file mode 100644 index 078cfc76c9..0000000000 --- a/test/py/tests/test_efi_capsule/signature.dts +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ - -/dts-v1/; -/plugin/; - -&{/} { - signature { - capsule-key = /incbin/("SIGNER.esl"); - }; -};