]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: better detection of softhsm library
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 7 Oct 2015 08:38:25 +0000 (10:38 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 7 Oct 2015 08:38:25 +0000 (10:38 +0200)
tests/suite/testpkcs11.softhsm

index 70badf14c2d9ecfa3b5feafeb0eaa711506da79a..9a1fc163c5ea9eccef5da5adf5fe7d7629f4b852 100755 (executable)
 # 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"