#!/usr/bin/bash
echo $*
if (( $# >= 3 )); then
     echo -e "Signing a message in SMIME format with OpenSSL" 
     openssl smime -sign -in $1 -text -signer $2 -inkey $3 -out $1.sig -passin pass:deadbeefdead
else
     echo "usage: signSMIME message signercertificate privatekey"
fi 
