#!/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


