diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-02-02 20:16:10 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-02-02 20:16:10 +0000 |
commit | 836bc55bed9d27130cf5be97bf90d041392d2299 (patch) | |
tree | 2200ab06f729c2870e6a1038e0bf525f506d2a03 | |
parent | a9fe9b74b0d441398feaae37542c26b363ceb73e (diff) | |
download | gpg-836bc55bed9d27130cf5be97bf90d041392d2299.tar gpg-836bc55bed9d27130cf5be97bf90d041392d2299.tar.gz gpg-836bc55bed9d27130cf5be97bf90d041392d2299.tar.bz2 gpg-836bc55bed9d27130cf5be97bf90d041392d2299.tar.xz gpg-836bc55bed9d27130cf5be97bf90d041392d2299.zip |
add script to generate gpg key
-rwxr-xr-x | generate-key.sh | 27 |
1 files changed, 27 insertions, 0 deletions
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 + |