about summary refs log tree commit diff
path: root/contrib
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2018-03-20 15:33:14 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-03-20 15:33:14 +0100
commit5004b4b3e625391ea83172c12cb6b2f6a44930c6 (patch)
tree96fe0547a04191ddc59c847f9c5297ecc27c0825 /contrib
parent64da4ff0fa4ad00c6330732394251c88d2fd90ce (diff)
downloadmblaze-5004b4b3e625391ea83172c12cb6b2f6a44930c6.tar.gz
mblaze-5004b4b3e625391ea83172c12cb6b2f6a44930c6.tar.xz
mblaze-5004b4b3e625391ea83172c12cb6b2f6a44930c6.zip
contrib/mp7m: add application/pkcs7-mime decoder
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/mp7m15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/mp7m b/contrib/mp7m
new file mode 100755
index 0000000..f8ca257
--- /dev/null
+++ b/contrib/mp7m
@@ -0,0 +1,15 @@
+#!/bin/sh
+# mp7m - decode S/MIME .p7m format
+
+tmp=$(mktemp -t mp7m.XXXXXX)
+trap "rm -f '$tmp'" INT TERM EXIT
+
+cat >"$tmp"
+
+if openssl pkcs7 -print_certs <"$tmp" |
+    openssl smime -verify -in "$tmp" -inform DER -noverify -signer /dev/stdin
+then
+	exit 64
+else
+	exit 63
+fi