2024-01-01 23:19:39 +01:00
|
|
|
########################################################################
|
|
|
|
# GNUPG AGENT
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
if [ -z $GPG_AGENT_INFO ]
|
|
|
|
then
|
|
|
|
GPG_TTY=$(tty)
|
|
|
|
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
SSH_AUTH_SOCK_EXTRA=${SSH_AUTH_SOCK%%.ssh}.extra
|
|
|
|
export GPG_TTY SSH_AUTH_SOCK SSH_AUTH_SOCK_EXTRA
|
|
|
|
pgrep -qu sdk gpg-agent || gpg-connect-agent -q /bye
|
|
|
|
fi
|
|
|
|
|
2024-01-08 23:06:28 +01:00
|
|
|
DEFAULT_KEY=CBD3C46864B46517E8FBB90FB6BC2EC552BE43BA
|
2024-01-01 23:19:39 +01:00
|
|
|
|
2024-01-08 23:06:28 +01:00
|
|
|
gnupg-extend-default-key() {
|
|
|
|
gpg --quick-set-expire $DEFAULT_KEY 1y '*'
|
|
|
|
}
|
|
|
|
gnupg-export-default-key() {
|
|
|
|
gpg --export --armor --export-options export-minimal $DEFAULT_KEY > codevoid-gpg.key
|
|
|
|
}
|
|
|
|
|
|
|
|
gnupg-upload-default-key() {
|
|
|
|
gpg --export $DEFAULT_KEY | curl -T - https://keys.openpgp.org
|
|
|
|
}
|