Skip to content

Commit

Permalink
test: add case of pkcs11 uri with pin-value
Browse files Browse the repository at this point in the history
  • Loading branch information
embetrix committed Dec 19, 2024
1 parent bd0367f commit 9be1ff7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stm32mp-sign-tool_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ echo "directories.tokendir = $PWD/.softhsm/tokens" > .softhsm/softhsm2.conf
pkcs11-tool --pin $PIN --module $PKCS11_MODULE_PATH --slot-index=0 --init-token --label=$TOKEN_NAME --so-pin $SO_PIN --init-pin
pkcs11-tool --pin $PIN --module $PKCS11_MODULE_PATH --keypairgen --key-type EC:prime256v1 --id 1 --label "testkeyECp256"
./stm32mp-sign-tool -v -k "pkcs11:object=testkeyECp256" -p 12345 -i image.stm32 -o image.stm32.signed -h hash.bin
./stm32mp-sign-tool -v -k "pkcs11:object=testkeyECp256?pin-value=12345" -i image.stm32 -o image.stm32.signed -h hash.bin

# test pkcs11 key (brainpool)
pkcs11-tool --pin $PIN --module $PKCS11_MODULE_PATH --keypairgen --key-type EC:brainpoolP256r1 --id 2 --label "testkeyECbrainpoolP256r1"
./stm32mp-sign-tool -v -k "pkcs11:object=testkeyECbrainpoolP256r1" -p 12345 -i image.stm32 -o image.stm32.signed -h hash.bin
./stm32mp-sign-tool -v -k "pkcs11:object=testkeyECbrainpoolP256r1?pin-value=12345" -i image.stm32 -o image.stm32.signed -h hash.bin

0 comments on commit 9be1ff7

Please sign in to comment.