Newer
Older
WickedDocs / Crypto / rsa-tests / signer.sh
@John Ryland John Ryland on 28 Nov 2015 287 bytes Add crypto functions
#!/bin/bash

#
# This script digitally signs a file and appends the signature on to the end of the file
# The private key in "mykey.pem" is used for the signing
#

cat $1 | openssl sha512 -sign mykey.pem > tmp-signature.file
cat $1 tmp-signature.file > $1.signed
rm tmp-signature.file