Skip to content

Commit

Permalink
parsec-cli-tests.sh: adapt to new serialNumber output
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mikkorapeli-linaro authored and tgonzalezorlandoarm committed Jan 16, 2024
1 parent d0d0ca8 commit 8948077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/parsec-cli-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,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
Expand Down

0 comments on commit 8948077

Please sign in to comment.