mirror of
https://github.com/romanz/amodem.git
synced 2026-03-06 23:05:57 +08:00
20 lines
590 B
Bash
Executable File
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
|