Files
amodem/gpg/demo.sh
Roman Zeyde b2d078eec6 simplify signer usage
and make less INFO loggin
2016-04-18 21:55:23 +03:00

20 lines
590 B
Bash
Executable File

#!/bin/bash
set -x
CREATED=1460731897 # needed for consistent public key creation
NAME="trezor_key" # will be used as GPG user id and public key name
echo "Hello GPG World!" > EXAMPLE
# Create, sign and export the public key
./signer.py $NAME --time $CREATED
# Install GPG v2.1 (modern) and import the public key
gpg2 --import $NAME.pub
gpg2 --list-keys $NAME
# Perform actual GPG signature using TREZOR
./signer.py $NAME EXAMPLE
./check.py $NAME.pub EXAMPLE.sig # pure Python verification
# gpg2 --edit-key trezor_key trust # optional: mark it as trusted
gpg2 --verify EXAMPLE.sig