aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2019-02-06 23:02:02 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2019-02-06 23:02:02 -0500
commit9c6745287c65484309b52d2b3ccdb47bc2ce2906 (patch)
tree8f06c1410c7ffb0f0570c35717a0a486ad97cf71
parentd909f6a31f6ec6dce1f41f4438d79ca32c495416 (diff)
downloadopenssl-pkcs11-export-9c6745287c65484309b52d2b3ccdb47bc2ce2906.tar.gz
Add installation of p11 kit module
p11-kit requires a <thing>.module file which at least points to the shared pkcs11 library to be installed in its module directory otherwise it won't include the token in any of its iterations. Install such a file for openssl-pkcs11. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac2
-rw-r--r--openssl-pkcs11.module5
3 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index ade58ae..ed0b3e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,6 +3,9 @@ EXTRA_DIST = README
pkcs11_LTLIBRARIES=openssl-pkcs11.la
pkcs11dir=@pkcs11_dir@
+pkcs11_configsdir=@pkcs11_configs@
+pkcs11_configs_DATA = openssl-pkcs11.module
+
openssl_pkcs11_la_LDFLAGS= -module -no-undefined -avoid-version -shared
openssl_pkcs11_la_SOURCES= pkcs11.c ini.c openssl-pkcs11.h cache.c crypto.c
openssl_pkcs11_la_CFLAGS = $(CFLAGS) $(CRYPTO_CFLAGS) $(P11KIT_CFLAGS) -Werror -Wall
diff --git a/configure.ac b/configure.ac
index 586ce64..dd2c139 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,7 @@ AC_ARG_WITH(
if test -z "$pkcs11_dir"; then
AC_MSG_ERROR([no pkcs11 directory: either install p11-kit-devel or specify --with-pkcs11-dir])
fi
+PKG_CHECK_VAR([pkcs11_configs], [p11-kit-1], [p11_module_configs])
LIBRARY_VERSION_MAJOR=`echo $PACKAGE_VERSION|cut -d. -f1`
AC_DEFINE_UNQUOTED(LIBRARY_VERSION_MAJOR, $LIBRARY_VERSION_MAJOR)
@@ -28,6 +29,7 @@ LIBRARY_VERSION_MINOR=`echo $PACKAGE_VERSION|cut -d. -f2`
AC_DEFINE_UNQUOTED(LIBRARY_VERSION_MINOR, $LIBRARY_VERSION_MINOR)
AC_SUBST(pkcs11_dir)
+AC_SUBST(pkcs11_configs)
AC_OUTPUT([Makefile tests/Makefile])
diff --git a/openssl-pkcs11.module b/openssl-pkcs11.module
new file mode 100644
index 0000000..1d142db
--- /dev/null
+++ b/openssl-pkcs11.module
@@ -0,0 +1,5 @@
+# This is the module for loading configured openssl keys
+# and exporting them as pkcs11 tokens
+#
+
+module: openssl-pkcs11.so