Changeset aeaf28b in mod_gnutls for test


Ignore:
Timestamp:
Mar 10, 2016, 6:32:34 AM (3 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
5725dca
Parents:
b0e5dae
git-author:
Thomas Klute <thomas2.klute@…> (03/10/16 06:25:10)
git-committer:
Thomas Klute <thomas2.klute@…> (03/10/16 06:32:34)
Message:

Allow user to set SoftHSM PKCS #11 module

Users may want to use a SoftHSM module outside the usual system paths,
e.g. to try a development version without installing. If SOFTHSM_LIB
is set at ./configure time, it is assumed to contain the absolute path
of the library to use.

Location:
test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/Makefile.am

    rb0e5dae raeaf28b  
    189189if HAVE_SOFTHSM
    190190AM_TESTS_ENVIRONMENT += export SOFTHSM="@SOFTHSM@"; \
    191         export SOFTHSM_MAJOR_VERSION="@SOFTHSM_MAJOR_VERSION@";
     191        export SOFTHSM_MAJOR_VERSION="@SOFTHSM_MAJOR_VERSION@"; \
     192        export SOFTHSM_LIB="@SOFTHSM_LIB@"
    192193endif
    193194
  • test/softhsm.bash

    rb0e5dae raeaf28b  
    9292fi
    9393
    94 # Try to find the libsofthsm[2] module in some common locations.
    95 softhsm_searchpath=(/usr/lib64/pkcs11 /usr/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm)
    96 for i in ${softhsm_searchpath[@]} ""; do
    97     SOFTHSM_LIB="${i}/${softhsm_libname}"
    98     echo "checking ${SOFTHSM_LIB} ..."
    99     if [ -f "${SOFTHSM_LIB}" ]; then
    100         echo "found!"
    101         export SOFTHSM_LIB
    102         break;
    103     fi
    104 done
     94if [ -z "${SOFTHSM_LIB}" ]; then
     95    # Try to find the libsofthsm[2] module in some common locations.
     96    softhsm_searchpath=(/usr/lib64/pkcs11 /usr/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm)
     97    for i in ${softhsm_searchpath[@]} ""; do
     98        SOFTHSM_LIB="${i}/${softhsm_libname}"
     99        echo "checking ${SOFTHSM_LIB} ..."
     100        if [ -f "${SOFTHSM_LIB}" ]; then
     101            echo "found!"
     102            export SOFTHSM_LIB
     103            break;
     104        fi
     105    done
     106else
     107    echo "using ${SOFTHSM_LIB} (set by user)"
     108fi
    105109
    106110if [ ! -f "${SOFTHSM_LIB}" ]; then
Note: See TracChangeset for help on using the changeset viewer.