dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 9d0f1ad15725a0c1e41809b46e7422d7a833eeb2
parent b576ddac31878246171a32e65244d54b4c2f98ee
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 12 Feb 2020 13:06:48 +0100

Improve gpg key expire script by extending subkey

Diffstat:
M.local/bin/gpg-extend-expire.sh | 35++++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)

diff --git a/.local/bin/gpg-extend-expire.sh b/.local/bin/gpg-extend-expire.sh @@ -1,7 +1,32 @@ #!/bin/sh -set -ev +set -e -# gpg --list-keys anders@adamsgaard.dk -key=5C959DF243CE4DD17A5B2610B790F4AD1BF858FE -gpg --quick-set-expire "$key" 1y -gpg --keyserver hkp://pool.sks-keyservers.net --send-keys "$key" +key="5C959DF243CE4DD17A5B2610B790F4AD1BF858FE" # --list-keys anders@adamsgaard.dk +gpg="gpg2" +pubkey_file="/tmp/ad-public-key.asc" +expire="1y" + + +$gpg --quick-set-expire "$key" "$expire" + +echo "##########################################" +echo "##########################################" +echo "#### ####" +echo "#### TYPE THE FOLLOWING: ####" +echo "#### ####" +echo "#### gpg> key 1 ####" +echo "#### gpg> expire ####" +echo "#### gpg> $expire ####" +echo "#### gpg> y ####" +echo "#### gpg> save ####" +echo "#### ####" +echo "##########################################" +echo "##########################################" + +$gpg --edit-key "$key" + +$gpg --armor --export "$key" > "$pubkey_file" +scp "$pubkey_file" ad@adamsgaard.dk:/var/www/domains/adamsgaard.dk/files/ + +$gpg --keyserver pool.sks-keyservers.net --send-keys "$key" +$gpg --keyserver pgp.mit.edu --send-keys "$key"