Skip to content

Commit

Permalink
feat: add aes generation test
Browse files Browse the repository at this point in the history
  • Loading branch information
nponsard committed Sep 18, 2023
1 parent eb381b0 commit 3917b17
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tools/tests/generate_aes_id.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh -x

set -e

KEYID=testAESkey

HEXID=$(echo -n ${KEYID} | xxd -ps)

curl -k -u admin:Administrator -v -X DELETE \
https://localhost:8443/api/v1/keys/$KEYID

pkcs11-tool --module target/debug/libnethsm_pkcs11.so --keygen --key-type AES:128 \
--login --login-type so --so-pin Administrator --id $HEXID

curl -k --fail-with-body -u operator:opPassphrase -v -X GET \
https://localhost:8443/api/v1/keys/$KEYID

0 comments on commit 3917b17

Please sign in to comment.