Skip to content

Commit

Permalink
fixup! Add setup script for testing with Kryoptic module
Browse files Browse the repository at this point in the history
  • Loading branch information
simo5 committed Jul 5, 2024
1 parent 2c2c03d commit c64e2fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/setup-kryoptic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export KRYOPTIC_CONF="$TMPPDIR/tokens/kryoptic.sql"
title LINE "Creating Kyroptic database"

export GNUTLS_SO_PIN=${PINVALUE}
p11tool --provider=${P11LIB} --initialize \
p11tool --provider="${P11LIB}" --initialize \
--label="Test" \
"pkcs11:manufacturer=Kryoptic%20Project" 2>&1
unset GNUTLS_SO_PIN
Expand All @@ -103,11 +103,11 @@ title LINE "Setting User PIN"
# marks at the end of the manufacturer and token names when using the
# --initialize-pin option
export GNUTLS_PIN=${PINVALUE}
p11tool --provider=${P11LIB} --initialize-pin \
p11tool --provider="${P11LIB}" --initialize-pin \
"pkcs11:manufacturer=Kryoptic%20Project%00;token=Test%00" 2>&1


P11DEFARGS="--module=${P11LIB}--login --pin=${PINVALUE}"
P11DEFARGS="--module=${P11LIB} --login --pin=${PINVALUE}"

# General cert configs
cat >> "${TMPPDIR}/cert.cfg" <<HEREDOC
Expand All @@ -130,6 +130,7 @@ CACRTN="caCert"


((SERIAL+=1))
# shellcheck disable=SC2086
pkcs11-tool ${P11DEFARGS} --keypairgen --key-type="RSA:2048" \
--label="${CACRTN}" --id="${KEYID}" 2>&1
"${certtool}" --generate-self-signed --outfile="${CACRT}.crt" \
Expand Down

0 comments on commit c64e2fe

Please sign in to comment.