Skip to content

Commit

Permalink
Update tests for OpenSC 0.25.1
Browse files Browse the repository at this point in the history
Signed-off-by: Pol Henarejos <[email protected]>
  • Loading branch information
polhenarejos committed Jun 22, 2024
1 parent d3751e3 commit db5c7ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/scripts/sign_and_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ create_dgst() {
test $? -eq 0 && echo -n "." || exit $?
}

dgsts=("sha1" "sha224" "sha256" "sha384" "sha512")
dgsts=("sha256" "sha384" "sha512")
for dgst in ${dgsts[*]}; do
echo -n " Create digest ${dgst}..."
create_dgst ${dgst}
Expand Down Expand Up @@ -104,7 +104,7 @@ dd if=/dev/zero bs=1 count=$((256-$tlen)) >> data_pad > /dev/null 2>&1
test $? -eq 0 && echo -n "." || exit $?
pkcs11-tool --id 1 --sign --pin 648219 --mechanism RSA-X-509 -i data_pad -o data.sig > /dev/null 2>&1
test $? -eq 0 && echo -n "." || exit $?
TDATA=$(tr -d '\0' < <(openssl rsautl -verify -inkey 1.pub -in data.sig -pubin -raw))
TDATA=$(tr -d '\0' < <(openssl rsautl -verify -inkey 1.pub -in data.sig -pubin -raw 2>/dev/null))
if [[ ${TEST_DATA} != "$TDATA" ]]; then
exit 1
fi
Expand Down

0 comments on commit db5c7ad

Please sign in to comment.