Sometimes sc-hsm-tool returns $?=1 despite it succeeds.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2026-02-25 23:26:11 +01:00
parent 7c8b39ff82
commit 5297e368d1
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -49,7 +49,7 @@ for alg in ${algs[*]}; do
grep -q "Key ref[[:blank:]]*: 10" <<< $e && exit $? || echo -e ".\t${OK}"
echo -n " Unwrap key..."
sc-hsm-tool --unwrap-key wrap-key.bin --key-reference 10 --pin 648219 --force > /dev/null 2>&1
test $? -eq 0 && echo -n "." || exit $?
echo -n "." || exit $?
e=$(pkcs15-tool -D 2>&1)
grep -q "Key ref[[:blank:]]*: 10" <<< $e && echo -e ".\t${OK}" || exit $?
echo -n " Cleaning..."