1 #!/bin/bash 2 3 if [ $# -ne 3 ] 4 then 5 echo "Usage: $0 alias filename passpharse" 6 exit -1 7 fi 8 9 openssl dgst -passin pass:"$3" -binary -sha1 -sign $1.pem $2 > $2.sign 10 11