diff --git a/scripts/gpg-agent b/scripts/gpg-agent new file mode 100755 index 0000000..0ea74e7 --- /dev/null +++ b/scripts/gpg-agent @@ -0,0 +1,2 @@ +#!/bin/bash +trezor-gpg agent diff --git a/scripts/gpg-init b/scripts/gpg-init index 3c4cdba..83496d2 100755 --- a/scripts/gpg-init +++ b/scripts/gpg-init @@ -14,7 +14,7 @@ mkdir -p "${HOMEDIR}" chmod 700 "${HOMEDIR}" # Generate new GPG identity and import into GPG keyring -trezor-gpg-create -v "${USER_ID}" -t "${TIMESTAMP}" -e "${CURVE}" > "${HOMEDIR}/pubkey.asc" +trezor-gpg create -v "${USER_ID}" -t "${TIMESTAMP}" -e "${CURVE}" > "${HOMEDIR}/pubkey.asc" gpg2 --homedir "${HOMEDIR}" --import < "${HOMEDIR}/pubkey.asc" rm -f "${HOMEDIR}/S.gpg-agent" # (otherwise, our agent won't be started automatically) @@ -24,7 +24,7 @@ echo "${FINGERPRINT}:6" | gpg2 --homedir "${HOMEDIR}" --import-ownertrust # Prepare GPG configuration file echo "# TREZOR-based GPG configuration -agent-program $(which trezor-gpg-agent) +agent-program $(dirname ${0})/gpg-agent personal-digest-preferences SHA512 " | tee "${HOMEDIR}/gpg.conf" diff --git a/scripts/gpg-shell b/scripts/gpg-shell index fbbf046..b4db164 100755 --- a/scripts/gpg-shell +++ b/scripts/gpg-shell @@ -13,10 +13,10 @@ then fi # Make sure that the device is unlocked before starting the shell -trezor-gpg-unlock +trezor-gpg unlock # Make sure TREZOR-based gpg-agent is running -gpg-connect-agent --agent-program "$(which trezor-gpg-agent)"