diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-05 12:52:20 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-09-05 12:52:20 -0300 |
commit | 702f37e055d15028c97195303d60dd209b13a60a (patch) | |
tree | cf344adeffdf56a54f12e30f10d9afc2c8057020 /parabola-keyring/update-keys | |
parent | 177ca49a40c9afdcad8bfbc7492c9f1a49d686ba (diff) | |
parent | 6af067f7fc3eb71b4cc7549999f3dd623afacb53 (diff) |
Merge branch 'master' of ../hackers
Conflicts:
authorized_keys
Diffstat (limited to 'parabola-keyring/update-keys')
-rwxr-xr-x | parabola-keyring/update-keys | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/parabola-keyring/update-keys b/parabola-keyring/update-keys new file mode 100755 index 0000000..235e620 --- /dev/null +++ b/parabola-keyring/update-keys @@ -0,0 +1,43 @@ +#!/bin/bash + +export LANG=C + +TMPDIR=$(mktemp -d) +trap "rm -rf '${TMPDIR}'" EXIT + +KEYSERVER='hkp://pool.sks-keyservers.net' +GPG="gpg --quiet --batch --no-tty --no-permission-warning --keyserver "${KEYSERVER}" --homedir ${TMPDIR}" + +pushd "$(dirname "$0")" >/dev/null + +$GPG --gen-key <<EOF +%echo Generating Parabola Keyring keychain master key... +Key-Type: RSA +Key-Length: 1024 +Key-Usage: sign +Name-Real: Parabola Keyring Keychain Master Key +Name-Email: parabola-keyring@localhost +Expire-Date: 0 +%commit +%echo Done +EOF + +rm -rf packager parabola-trusted +mkdir packager + +while read -ra data; do + keyid="${data[0]}" + username="${data[@]:1}" + ${GPG} --recv-keys ${keyid} &>/dev/null + printf 'clean\nquit\ny\n' | \ + ${GPG} --command-fd 0 --edit-key ${keyid} + FD=$(mktemp) + exec 4>"${FD}" + ${GPG} --yes --lsign-key ${keyid} &>/dev/null + ${GPG} --armor --output packager/${username}.asc --export ${keyid} + echo "${keyid}:4:" >> parabola-trusted +done < packager-keyids + +cat packager/*.asc > parabola.gpg + +popd >/dev/null |