Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 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 | |