summaryrefslogtreecommitdiff
path: root/tests/suite
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-10-07 10:38:25 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-10-07 10:38:59 +0200
commitb843952d2d1a428f07649b294fe11c793353439a (patch)
tree95aa7d88a312297136b4086d30211af0cc05ac4b /tests/suite
parent9fa666213bbdf29a00eb92207306336b044f7509 (diff)
downloadgnutls-b843952d2d1a428f07649b294fe11c793353439a.tar.gz
tests: better detection of softhsm library
Diffstat (limited to 'tests/suite')
-rwxr-xr-xtests/suite/testpkcs11.softhsm16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/suite/testpkcs11.softhsm b/tests/suite/testpkcs11.softhsm
index 70badf14c2..9a1fc163c5 100755
--- a/tests/suite/testpkcs11.softhsm
+++ b/tests/suite/testpkcs11.softhsm
@@ -18,15 +18,17 @@
# along with GnuTLS; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-if test -f /usr/lib64/pkcs11/libsofthsm2.so; then
- ADDITIONAL_PARAM="--provider /usr/lib64/pkcs11/libsofthsm2.so"
-else
- if test -f /usr/lib/softhsm/libsofthsm.so; then
- ADDITIONAL_PARAM="--provider /usr/lib/softhsm/libsofthsm.so"
+for i in /usr/lib64/pkcs11 /usr/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm;do
+ if test -f "$i/libsofthsm2.so"; then
+ ADDITIONAL_PARAM="--provider $i/libsofthsm2.so"
+ break
else
- ADDITIONAL_PARAM="--provider /usr/lib64/softhsm/libsofthsm.so"
+ if test -f "$i/libsofthsm.so";then
+ ADDITIONAL_PARAM="--provider $i/libsofthsm.so"
+ break
+ fi
fi
-fi
+done
init_card () {
PIN="$1"