mirror of
https://git.yoctoproject.org/meta-security
synced 2026-06-05 14:30:42 +00:00
parsec-tool: fix serialNumber check
New openssl 3.2.0 version removed spaces around serialNumber in: Subject: CN=parallaxsecond.com, serialNumber=EZ4U2CIXL Fixes parsec-service oeqa test on qemu. Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
committed by
Armin Kuster
parent
b2e1511338
commit
7fab92b3c0
+33
@@ -0,0 +1,33 @@
|
||||
From b5cbf8635483e2c1254d15af7427696a378dadf7 Mon Sep 17 00:00:00 2001
|
||||
From: Mikko Rapeli <mikko.rapeli@linaro.org>
|
||||
Date: Wed, 3 Jan 2024 12:30:38 +0000
|
||||
Subject: [PATCH] parsec-cli-tests.sh: adapt to new serialNumber output
|
||||
|
||||
openssl 3.2.0 from yocto prints serialNumber to output
|
||||
without spaces so support both that and the old with
|
||||
spaces output to pass the test. Not using regular
|
||||
expressions to work on simpler grep implementations.
|
||||
|
||||
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
|
||||
---
|
||||
tests/parsec-cli-tests.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/parallaxsecond/parsec-tool/pull/120]
|
||||
|
||||
diff --git a/tests/parsec-cli-tests.sh b/tests/parsec-cli-tests.sh
|
||||
index 7693072..4dad2bb 100755
|
||||
--- a/tests/parsec-cli-tests.sh
|
||||
+++ b/tests/parsec-cli-tests.sh
|
||||
@@ -225,7 +225,7 @@ test_csr() {
|
||||
run_cmd $OPENSSL req -text -noout -verify -in ${MY_TMP}/${KEY}.csr >${MY_TMP}/${KEY}.txt
|
||||
debug cat ${MY_TMP}/${KEY}.txt
|
||||
|
||||
- if ! cat ${MY_TMP}/${KEY}.txt | grep "Subject:" | grep "serialNumber = ${TEST_SERIAL}"; then
|
||||
+ if ! cat ${MY_TMP}/${KEY}.txt | grep "Subject:" | grep -e "serialNumber = ${TEST_SERIAL}" -e "serialNumber=${TEST_SERIAL}"; then
|
||||
echo "Error: The CSR does not contain the serialNumber field of the Distinguished Name"
|
||||
EXIT_CODE=$(($EXIT_CODE+1))
|
||||
fi
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
|
||||
|
||||
inherit cargo cargo-update-recipe-crates
|
||||
|
||||
SRC_URI += "crate://crates.io/parsec-tool/${PV} \
|
||||
SRC_URI += "\
|
||||
crate://crates.io/parsec-tool/${PV} \
|
||||
file://0001-parsec-cli-tests.sh-adapt-to-new-serialNumber-output.patch \
|
||||
"
|
||||
SRC_URI[parsec-tool-0.7.0.sha256sum] = "76afb4416d04c5af9f81285dfff390b09c6926aabd6b4ee20dc07470a9698732"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user