]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Rely on SoftHSM being installed correctly with a p11-kit .module file
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 14 Dec 2016 20:30:47 +0000 (20:30 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 14 Dec 2016 20:30:47 +0000 (20:30 +0000)
I don't actually remember why I added my own; it *ought* to be installed
correctly by the distribution's packaging of SoftHSM.

There was a brief discussion about my hard-coded version being
Fedora-specific, followed by a suggestion that I could pick up the
proper path from and existing module file, followed by the realisation
that said existing module file would suffice anyway. So just require it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
tests/.config/pkcs11/modules/softhsm2.module [deleted file]
tests/Makefile.am
tests/auth-pkcs11

diff --git a/tests/.config/pkcs11/modules/softhsm2.module b/tests/.config/pkcs11/modules/softhsm2.module
deleted file mode 100644 (file)
index 2f06e09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-module:/usr/lib64/pkcs11/libsofthsm2.so
index d79bb84a582c99b5abe3303c10f0fc2a5df2e9e0..06e9cb65e113ef11d833101409c7990a0137f4a7 100644 (file)
@@ -171,8 +171,8 @@ $(certsdir)/ec-key-pkcs1-aes128.pem: certs/ec-key-pkcs1.pem
        $(OPENSSL) x509 -days 3650 -CA $(certsdir)/ca.pem -CAkey $(certsdir)/ca-key.pem \
                -set_serial $(shell date +%s) -req -out $@ -in $<
 
-SHM2_UTIL=HOME=$(srcdir) SOFTHSM2_CONF=softhsm2.conf softhsm2-util
-P11TOOL=HOME=$(srcdir) SOFTHSM2_CONF=softhsm2.conf p11tool
+SHM2_UTIL=SOFTHSM2_CONF=softhsm2.conf softhsm2-util
+P11TOOL=SOFTHSM2_CONF=softhsm2.conf p11tool
 
 # Nice and simple: Certs visible without login, public keys present in token
 softhsm-setup0:
index 5e9bab73a383f61bd273e34f89d27c11e9c57075..3eb988a89206ed686088751b77b7615dbd552d9c 100755 (executable)
@@ -36,7 +36,7 @@ for TOKEN in ${pkcs11_tokens}; do
     for KEY in ${pkcs11_keys}; do
        echo -n "Connecting to obtain cookie (token ${TOKEN} key ${KEY})... "
        CERTURI="pkcs11:token=${TOKEN};${KEY};pin-value=1234"
-       ( echo "test" | HOME=${srcdir} SOFTHSM2_CONF=softhsm2.conf LD_PRELOAD=libsocket_wrapper.so \
+       ( echo "test" | SOFTHSM2_CONF=softhsm2.conf LD_PRELOAD=libsocket_wrapper.so \
                            $OPENCONNECT -q $ADDRESS:443 -u test -c "${CERTURI}" --key-password 1234 --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly --passwd-on-stdin ) ||
            fail $PID "Could not connect with token ${TOKEN} key ${KEY##*/}!"
     done