summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-02-03 13:05:26 +0100
committerStef Walter <stefw@gnome.org>2013-02-05 15:05:05 +0100
commitf3a3e1e6a413dc93d0a1eb330a32404d803f5307 (patch)
treecd7a1df1f3e317fe45472be7607f9a6e059d91bc /tools
parent08f1a7f3cfe87bc19ecd564711b4d2beaa603924 (diff)
Add a placeholder external 'extract-trust' command
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am4
-rwxr-xr-xtools/p11-kit-extract-trust.in27
2 files changed, 31 insertions, 0 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 32cc21e..e28f15f 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -48,4 +48,8 @@ p11_kit_SOURCES += \
save.c save.h \
$(NULL)
+externaldir = $(pkgdatadir)
+external_SCRIPTS = \
+ p11-kit-extract-trust
+
endif # WITH_ASN1
diff --git a/tools/p11-kit-extract-trust.in b/tools/p11-kit-extract-trust.in
new file mode 100755
index 0000000..cc7e5fa
--- /dev/null
+++ b/tools/p11-kit-extract-trust.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# This script is a placeholder designed to be replaced when this software
+# has been customized for distribution.
+
+echo "WARNING: This placeholder extract-trust command has not been customized"
+echo "by your distribution or administrator. Extracting trust infromation to"
+echo "the following example locations:"
+echo
+echo " ~/extract-trust-example/openssl-bundle.pem"
+echo " ~/extract-trust-example/server-auth-bundle.pem"
+echo " ~/extract-trust-example/cacerts"
+
+DEST=~/extract-trust-example
+
+# These are nested autoconf variables
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+
+mkdir -p $DEST
+
+@bindir@/p11-kit extract --format=openssl-bundle --filter=ca-anchors \
+ --overwrite $DEST/openssl-bundle.pem
+@bindir@/p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite \
+ --purpose server-auth $DEST/server-auth-bundle.pem
+@bindir@/p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite \
+ --purpose server-auth $DEST/cacerts