Skip to content

Commit

Permalink
Add p11proxy to OpenDNSSEC "test-rsaimport" tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Nov 30, 2021
1 parent d65b7e9 commit 0d86768
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion testdata/ci-opendnssec-tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -euo pipefail
shopt -s nullglob globstar

export PKCS11PROXY_CKBI_TARGET=/usr/lib64/pkcs11/libsofthsm2.so
export P11PROXY_CKBI_TARGET=$PKCS11PROXY_CKBI_TARGET

echo "===== init slot 0 ====="

Expand All @@ -17,10 +18,22 @@ echo "===== test-all slot 0 (via pkcs11proxy) ====="

pkcs11-testing --module ./libpkcs11proxy.so --slot "$SLOT_ID" --pin 1234 --test-all | tee test-all-pkcs11proxy.txt || true

echo "===== test-all slot 0 (diff) ====="
echo "===== test-all slot 0 (diff via pkcs11proxy) ====="

diff -I '^Modulus: [0-9A-F]\+$' test-all-default.txt test-all-pkcs11proxy.txt || testdata/dump-proxy-log-fail.bash

echo "===== test-rsaimport slot 0 (default) ====="

pkcs11-testing --module "$PKCS11PROXY_CKBI_TARGET" --slot "$SLOT_ID" --pin 1234 --test-rsaimport | tee test-rsaimport-default.txt || true

echo "===== test-rsaimport slot 0 (via p11proxy) ====="

pkcs11-testing --module ./libp11proxy.so --slot "$SLOT_ID" --pin 1234 --test-rsaimport | tee test-rsaimport-p11proxy.txt || true

echo "===== test-rsaimport slot 0 (diff via p11proxy) ====="

diff -I '^Modulus: [0-9A-F]\+$' test-rsaimport-default.txt test-rsaimport-p11proxy.txt || testdata/dump-proxy-log-fail.bash

echo "===== init slot 1 ====="

SLOT_ID=$(softhsm2-util --init-token --slot 1 --label softhsm --so-pin 1234 --pin 1234 | grep -oE '[^ ]+$')
Expand Down

0 comments on commit 0d86768

Please sign in to comment.