trezor-agent/trezor_agent/gpg/test.sh

15 lines
498 B
Bash
Raw Normal View History

2016-04-28 19:17:08 +00:00
# NEVER RUN ON YOUR OWN REAL GPG KEYS!!!!! THEY WILL BE DELETED!!!!!
2016-04-29 08:14:27 +00:00
set -x -e -u
CURVE=ed25519
2016-04-29 19:10:04 +00:00
(cd ~/.gnupg && rm -rf openpgp-revocs.d/ private-keys-v1.d/ pubring.kbx* trustdb.gpg /tmp/log *.gpg; killall gpg-agent || true)
2016-04-28 19:10:40 +00:00
gpg2 --full-gen-key --expert
gpg2 --export > romanz.pub
2016-04-28 19:17:08 +00:00
NOW=`date +%s`
trezor-gpg -t $NOW -v -e $CURVE --subkey "romanz" -o subkey.pub
2016-04-29 14:45:16 +00:00
gpg2 -K
2016-04-28 19:10:40 +00:00
gpg2 -vv --import <(cat romanz.pub subkey.pub)
2016-04-28 19:17:08 +00:00
gpg2 -K
trezor-gpg -t $NOW -v -e $CURVE "romanz" EXAMPLE
2016-04-28 19:17:08 +00:00
gpg2 --verify EXAMPLE.sig