#! /bin/sh # syntax: zip_sendsign_encmail if test $# -le 1 then echo "syntax: zip_sendsign_encmail " exit fi RANDFILE=randomfile export RANDFILE zip ZiSiEn $2 openssl enc -base64 -e -out ZiSiEn -in ZiSiEn.zip openssl smime -sign -in ZiSiEn -out ZiSiEn.sig -signer $3_cert.pem -inkey $3_privatekey.pem openssl smime -encrypt -in ZiSiEn.sig -des3 -out ZiSiEn $1_cert.pem Mail -s "submission of A5" $1 < ZiSiEn rm ZiSiEn.zip ZiSiEn.sig