#!/usr/bin/bash

if (( $# == 3 )); then
     echo -e "Verify a SMIME message with OpenSSL" 
     rm -f $1.verified
     openssl smime -verify -in $1  -out $1.verified -inkey $2 -CAfile $3
     ls -l $1.verified
else
     echo "usage: verifySMIME file certificate CA.cert"
fi 
