Changeset 63468af in mod_gnutls for test/test-24_pkcs11_cert.bash


Ignore:
Timestamp:
Apr 16, 2016, 11:14:26 AM (4 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, upstream
Children:
b586b27, ce12806
Parents:
02c8e54 (diff), c6cfe6e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Imported Upstream version 0.7.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test-24_pkcs11_cert.bash

    r02c8e54 r63468af  
    33testdir="$(dirname ${0})/tests/24_pkcs11_cert"
    44
    5 # The Apache/SoftHSM configuration mixes up directories, so generate a
    6 # config file with an absolute path to the token database from a
    7 # template. Generating it on every run avoids problems if the source
     5# The Apache/SoftHSM configuration mixes up directories, so generate
     6# config files with absolute paths to the token database from a
     7# template. Generating them on every run avoids problems if the source
    88# tree was moved.
    99tmp_softhsm_conf="$(mktemp mod_gnutls_test-XXXXXX.conf)"
     
    1414trap cleanup_tmpconf EXIT
    1515
    16 sed "s,__DIR__,$(realpath $(pwd))," \
    17     "${testdir}/softhsm.conf.in" \
    18     >"${tmp_softhsm_conf}"
    19 export SOFTHSM_CONF="${tmp_softhsm_conf}"
     16if [ "${SOFTHSM_MAJOR_VERSION}" = "1" ]; then
     17    cat - >"${tmp_softhsm_conf}" <<EOF
     180:$(realpath $(pwd))/server/softhsm.db
     19EOF
     20    export SOFTHSM_CONF="${tmp_softhsm_conf}"
     21elif [ "${SOFTHSM_MAJOR_VERSION}" = "2" ]; then
     22    cat - >"${tmp_softhsm_conf}" <<EOF
     23objectstore.backend = file
     24directories.tokendir = $(realpath $(pwd))/server/softhsm2.db
     25EOF
     26    export SOFTHSM2_CONF="${tmp_softhsm_conf}"
     27fi
     28
    2029echo "Generated temporary SoftHSM config ${tmp_softhsm_conf}:"
    2130cat "${tmp_softhsm_conf}"
Note: See TracChangeset for help on using the changeset viewer.