added import
This commit is contained in:
parent
2ebd2761a0
commit
cd4aa22291
1 changed files with 13 additions and 1 deletions
14
gpgtool
14
gpgtool
|
@ -213,7 +213,7 @@ create () {
|
|||
mv /home/daniel/.gnupg/openpgp-revocs.d/${id}.rev ${keypath}/${id}/
|
||||
echo "----- Restoring secret key for further modification …"
|
||||
ln -sf ${keypath}/${id}/${keygrip}.key ${tempdir}/gpghome/private-keys-v1.d/
|
||||
echo "----- Remember to send & close when done!"
|
||||
echo "----- Remember to import / send & close when done!"
|
||||
}
|
||||
|
||||
# Extends an open key.
|
||||
|
@ -236,6 +236,7 @@ extend () {
|
|||
cp ${keypath}/${id}/${id}.*.asc ${exdir}
|
||||
echo "----- Restoring secret key …"
|
||||
ln -sf ${keypath}/${id}/${keygrip}.key ${tempdir}/gpghome/private-keys-v1.d/
|
||||
echo -e "\nYou probably want to \`gpgtool import ${id}\` to load the updated key into your regular keyring."
|
||||
}
|
||||
|
||||
# Sends keys to key servers.
|
||||
|
@ -253,6 +254,17 @@ send () {
|
|||
done
|
||||
}
|
||||
|
||||
# Imports keys into your regular GnuPG keyring.
|
||||
import () {
|
||||
_checkinit
|
||||
|
||||
local keyfile=${keypath}/${id}/${id}.private.asc
|
||||
[[ ! -f "${keyfile}" ]] && echo "Cannot find secret key ${keyfile}, aborting …" && exit 1
|
||||
|
||||
"Importing key into your regular GnuPG keying …"
|
||||
gpg --import-options keep-ownertrust --import "${keyfile}"
|
||||
}
|
||||
|
||||
# Prints usage information.
|
||||
usage () {
|
||||
echo FIXXME
|
||||
|
|
Loading…
Reference in a new issue