diff options
author | Damien Miller <djm@mindrot.org> | 2019-01-21 02:31:29 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-21 03:09:23 +0100 |
commit | ba58a529f45b3dae2db68607d8c54ae96e90e705 (patch) | |
tree | 4cc0e36b9bde80025446c0f1f21dcd16dc4b3d41 /regress/agent-pkcs11.sh | |
parent | upstream: always print the caller's error message in ossl_error(), (diff) | |
download | openssh-ba58a529f45b3dae2db68607d8c54ae96e90e705.tar.xz openssh-ba58a529f45b3dae2db68607d8c54ae96e90e705.zip |
make agent-pkcs11 search harder for softhsm2.so
Diffstat (limited to 'regress/agent-pkcs11.sh')
-rw-r--r-- | regress/agent-pkcs11.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/regress/agent-pkcs11.sh b/regress/agent-pkcs11.sh index ab429768e..a57dad6ee 100644 --- a/regress/agent-pkcs11.sh +++ b/regress/agent-pkcs11.sh @@ -3,9 +3,24 @@ tid="pkcs11 agent test" +try_token_libs() { + for _lib in "$@" ; do + if test -f "$_lib" ; then + verbose "Using token library $_lib" + TEST_SSH_PKCS11="$_lib" + return + fi + done + echo "skipped: Unable to find PKCS#11 token library" + exit 0 +} + +try_token_libs \ + /usr/local/lib/softhsm/libsofthsm2.so \ + /usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so + TEST_SSH_PIN=1234 TEST_SSH_SOPIN=12345678 -TEST_SSH_PKCS11=/usr/local/lib/softhsm/libsofthsm2.so if [ "x$TEST_SSH_SSHPKCS11HELPER" != "x" ]; then SSH_PKCS11_HELPER="${TEST_SSH_SSHPKCS11HELPER}" export SSH_PKCS11_HELPER |