opnsense-tools/scripts/pkg_sign.sh
2017-08-27 06:04:54 +02:00

13 lines
198 B
Bash
Executable file

#!/bin/sh
PUBKEY=${1}
PRIVKEY=${2}
read -t 30 SUM
[ -z "${SUM}" ] && exit 1
echo SIGNATURE
echo -n ${SUM} | openssl dgst -sign "${PRIVKEY}" -sha256 -binary
echo
echo CERT
cat "${PUBKEY}"
echo END