Files
2021-01-12 22:04:24 +08:00

14 lines
295 B
Bash

# SPDGST(IN=输入文件,OUT=输入文件)
FileIn=$1
FileOut=$2
if ! openssl dgst -sha1 -binary -out spdgst.$$ $FileIn
then
exit 8
fi
if ! openssl rsautl -sign -in spdgst.$$ -inkey ${HWORKDIR}/bin/pkey.pem -out $FileOut
then
rm -f spdgst.$$
exit 8
fi
rm -f spdgst.$$
exit 0