diff options
author | Damien Miller <djm@mindrot.org> | 2019-01-21 12:31:29 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-21 13:09:23 +1100 |
commit | ba58a529f45b3dae2db68607d8c54ae96e90e705 (patch) | |
tree | 4cc0e36b9bde80025446c0f1f21dcd16dc4b3d41 /regress | |
parent | 662be40c62339ab645113c930ce689466f028938 (diff) |
make agent-pkcs11 search harder for softhsm2.so
Diffstat (limited to 'regress')
-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 @@ | |||
3 | 3 | ||
4 | tid="pkcs11 agent test" | 4 | tid="pkcs11 agent test" |
5 | 5 | ||
6 | try_token_libs() { | ||
7 | for _lib in "$@" ; do | ||
8 | if test -f "$_lib" ; then | ||
9 | verbose "Using token library $_lib" | ||
10 | TEST_SSH_PKCS11="$_lib" | ||
11 | return | ||
12 | fi | ||
13 | done | ||
14 | echo "skipped: Unable to find PKCS#11 token library" | ||
15 | exit 0 | ||
16 | } | ||
17 | |||
18 | try_token_libs \ | ||
19 | /usr/local/lib/softhsm/libsofthsm2.so \ | ||
20 | /usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so | ||
21 | |||
6 | TEST_SSH_PIN=1234 | 22 | TEST_SSH_PIN=1234 |
7 | TEST_SSH_SOPIN=12345678 | 23 | TEST_SSH_SOPIN=12345678 |
8 | TEST_SSH_PKCS11=/usr/local/lib/softhsm/libsofthsm2.so | ||
9 | if [ "x$TEST_SSH_SSHPKCS11HELPER" != "x" ]; then | 24 | if [ "x$TEST_SSH_SSHPKCS11HELPER" != "x" ]; then |
10 | SSH_PKCS11_HELPER="${TEST_SSH_SSHPKCS11HELPER}" | 25 | SSH_PKCS11_HELPER="${TEST_SSH_SSHPKCS11HELPER}" |
11 | export SSH_PKCS11_HELPER | 26 | export SSH_PKCS11_HELPER |