diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2024-01-03 15:35:19 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-01-28 12:13:54 -0500 |
commit | 7fab92b3c0650186d57b06466b420ca42995444a (patch) | |
tree | 20c7d11e47e88f80d7a2dc506744feb04bc73b50 | |
parent | b2e1511338705f90f34f19f938650c185200c067 (diff) | |
download | meta-security-7fab92b3c0650186d57b06466b420ca42995444a.tar.gz |
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>
-rw-r--r-- | meta-parsec/recipes-parsec/parsec-tool/files/0001-parsec-cli-tests.sh-adapt-to-new-serialNumber-output.patch | 33 | ||||
-rw-r--r-- | meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.7.0.bb | 4 |
2 files changed, 36 insertions, 1 deletions
diff --git a/meta-parsec/recipes-parsec/parsec-tool/files/0001-parsec-cli-tests.sh-adapt-to-new-serialNumber-output.patch b/meta-parsec/recipes-parsec/parsec-tool/files/0001-parsec-cli-tests.sh-adapt-to-new-serialNumber-output.patch new file mode 100644 index 0000000..6c5a94f --- /dev/null +++ b/meta-parsec/recipes-parsec/parsec-tool/files/0001-parsec-cli-tests.sh-adapt-to-new-serialNumber-output.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From b5cbf8635483e2c1254d15af7427696a378dadf7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
3 | Date: Wed, 3 Jan 2024 12:30:38 +0000 | ||
4 | Subject: [PATCH] parsec-cli-tests.sh: adapt to new serialNumber output | ||
5 | |||
6 | openssl 3.2.0 from yocto prints serialNumber to output | ||
7 | without spaces so support both that and the old with | ||
8 | spaces output to pass the test. Not using regular | ||
9 | expressions to work on simpler grep implementations. | ||
10 | |||
11 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
12 | --- | ||
13 | tests/parsec-cli-tests.sh | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/parallaxsecond/parsec-tool/pull/120] | ||
17 | |||
18 | diff --git a/tests/parsec-cli-tests.sh b/tests/parsec-cli-tests.sh | ||
19 | index 7693072..4dad2bb 100755 | ||
20 | --- a/tests/parsec-cli-tests.sh | ||
21 | +++ b/tests/parsec-cli-tests.sh | ||
22 | @@ -225,7 +225,7 @@ test_csr() { | ||
23 | run_cmd $OPENSSL req -text -noout -verify -in ${MY_TMP}/${KEY}.csr >${MY_TMP}/${KEY}.txt | ||
24 | debug cat ${MY_TMP}/${KEY}.txt | ||
25 | |||
26 | - if ! cat ${MY_TMP}/${KEY}.txt | grep "Subject:" | grep "serialNumber = ${TEST_SERIAL}"; then | ||
27 | + if ! cat ${MY_TMP}/${KEY}.txt | grep "Subject:" | grep -e "serialNumber = ${TEST_SERIAL}" -e "serialNumber=${TEST_SERIAL}"; then | ||
28 | echo "Error: The CSR does not contain the serialNumber field of the Distinguished Name" | ||
29 | EXIT_CODE=$(($EXIT_CODE+1)) | ||
30 | fi | ||
31 | -- | ||
32 | 2.34.1 | ||
33 | |||
diff --git a/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.7.0.bb b/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.7.0.bb index 26e4d80..af0d362 100644 --- a/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.7.0.bb +++ b/meta-parsec/recipes-parsec/parsec-tool/parsec-tool_0.7.0.bb | |||
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | |||
5 | 5 | ||
6 | inherit cargo cargo-update-recipe-crates | 6 | inherit cargo cargo-update-recipe-crates |
7 | 7 | ||
8 | SRC_URI += "crate://crates.io/parsec-tool/${PV} \ | 8 | SRC_URI += "\ |
9 | crate://crates.io/parsec-tool/${PV} \ | ||
10 | file://0001-parsec-cli-tests.sh-adapt-to-new-serialNumber-output.patch \ | ||
9 | " | 11 | " |
10 | SRC_URI[parsec-tool-0.7.0.sha256sum] = "76afb4416d04c5af9f81285dfff390b09c6926aabd6b4ee20dc07470a9698732" | 12 | SRC_URI[parsec-tool-0.7.0.sha256sum] = "76afb4416d04c5af9f81285dfff390b09c6926aabd6b4ee20dc07470a9698732" |
11 | 13 | ||