From: Nikos Mavrogiannopoulos Date: Wed, 7 Oct 2015 08:38:25 +0000 (+0200) Subject: tests: better detection of softhsm library X-Git-Tag: gnutls_3_5_0~649 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c141b08728e0853633c8cd3dc35d108984d47f9c;p=thirdparty%2Fgnutls.git tests: better detection of softhsm library --- 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"