summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2012-02-27 22:07:05 +0100
committerSamuel Lidén Borell <samuel@slbdata.se>2012-02-27 22:07:05 +0100
commitcafcab12701d354008c267f8a7a2501c831d4869 (patch)
tree98202ffbe2e04b59d2fd4d3f6a196083576dbe33 /configure
parent51e8f65cc3378cc090231bef2ad6713a20c444b0 (diff)
downloadfribid-cafcab12701d354008c267f8a7a2501c831d4869.tar.gz
fribid-cafcab12701d354008c267f8a7a2501c831d4869.tar.bz2
fribid-cafcab12701d354008c267f8a7a2501c831d4869.zip
configure script: Check that the specified PKCS#11 module is valid
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure b/configure
index bff04bf..8343059 100755
--- a/configure
+++ b/configure
@@ -257,6 +257,13 @@ if [ "$enable_pkcs11" = 1 ]; then
if [ "x${pkcs11Module%opensc-pkcs11.so}" != "x$pkcs11Module" ]; then
echo "Make sure that you have installed OpenSC!" >&2
fi
+ elif type readelf grep > /dev/null 2> /dev/null; then
+ # Check that it's actually a PKCS#11 module
+ if ! readelf -s "$pkcs11Module" | grep -q C_Initialize; then
+ echo >&2
+ echo "ERROR: $pkcs11Module is not a PKCS#11 module" >&2
+ echo "Normally you should use the file opensc-pkcs11.so from OpenSC." >&2
+ fi
fi
else
echo " PKCS#11 smartcard support disabled"