From 836bc55bed9d27130cf5be97bf90d041392d2299 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Wed, 2 Feb 2011 20:16:10 +0000 Subject: add script to generate gpg key --- generate-key.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 generate-key.sh diff --git a/generate-key.sh b/generate-key.sh new file mode 100755 index 0000000..6df8006 --- /dev/null +++ b/generate-key.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +GPGHOMEDIR="./homedir" +PUBDIR="./public" +PRIVDIR="./private" + +pubkey="$PUBDIR/mageia-board-pubkey.gpg" +seckey="$PRIVDIR/mageia-board-seckey.gpg" + +chmod 700 "$GPGHOMEDIR" + +echo "Generate key :" +gpg --homedir "$GPGHOMEDIR" --batch --gen-key board.batch + +echo "Public key :" +gpg --homedir "$GPGHOMEDIR" --list-keys +gpg --homedir "$GPGHOMEDIR" --list-keys --fingerprint > "$PUBDIR/mageia-board-fingerprint.txt" +gpg --homedir homedir --export -a > "$pubkey" + +echo "Secret key :" +gpg --homedir "$GPGHOMEDIR" --list-secret-keys +gpg --homedir homedir --export-secret-keys -a > "$seckey" + +rm -Rf "$GPGHOMEDIR" + +#TODO : split secret key using ssss-split + -- cgit v1.2.1