mirror of
https://github.com/romanz/amodem.git
synced 2026-03-17 15:16:00 +08:00
gpg: add helper scripts
This commit is contained in:
16
scripts/gpg-init
Executable file
16
scripts/gpg-init
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
USER_ID="${1}"
|
||||
HOMEDIR=~/.gnupg/trezor
|
||||
CURVE="ed25519" # or "nist256p1"
|
||||
|
||||
rm -rf "${HOMEDIR}"
|
||||
mkdir -p "${HOMEDIR}"
|
||||
chmod 700 "${HOMEDIR}"
|
||||
|
||||
trezor-gpg -v create "${USER_ID}" -e "${CURVE}" > "${HOMEDIR}/pubkey.asc"
|
||||
gpg2 --homedir "${HOMEDIR}" --import < "${HOMEDIR}/pubkey.asc"
|
||||
gpg2 --homedir "${HOMEDIR}" --edit-key "${USER_ID}" trust
|
||||
|
||||
$(dirname $0)/gpg-shell
|
||||
Reference in New Issue
Block a user