blob: 6c5a94f3b9be791e8d8cb205bdbdfa68256b2c74 [file] [log] [blame]
Patrick Williams73bd93f2024-02-20 08:07:48 -06001From b5cbf8635483e2c1254d15af7427696a378dadf7 Mon Sep 17 00:00:00 2001
2From: Mikko Rapeli <mikko.rapeli@linaro.org>
3Date: Wed, 3 Jan 2024 12:30:38 +0000
4Subject: [PATCH] parsec-cli-tests.sh: adapt to new serialNumber output
5
6openssl 3.2.0 from yocto prints serialNumber to output
7without spaces so support both that and the old with
8spaces output to pass the test. Not using regular
9expressions to work on simpler grep implementations.
10
11Signed-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
16Upstream-Status: Submitted [https://github.com/parallaxsecond/parsec-tool/pull/120]
17
18diff --git a/tests/parsec-cli-tests.sh b/tests/parsec-cli-tests.sh
19index 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--
322.34.1
33