You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mblaze/contrib/mp7m

16 lines
272 B
Bash

#!/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