diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-02-03 15:51:13 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-02-03 15:51:13 +0000 |
commit | fbe7c0926b81390fd6743cc45828cdb485319dd5 (patch) | |
tree | 9907d5701b64cb078447ccf251686b3e2aca2bc0 /generate-key | |
parent | 72a606f0240d8c8800a6311d0f3caf9aabfabb58 (diff) | |
download | gpg-fbe7c0926b81390fd6743cc45828cdb485319dd5.tar gpg-fbe7c0926b81390fd6743cc45828cdb485319dd5.tar.gz gpg-fbe7c0926b81390fd6743cc45828cdb485319dd5.tar.bz2 gpg-fbe7c0926b81390fd6743cc45828cdb485319dd5.tar.xz gpg-fbe7c0926b81390fd6743cc45828cdb485319dd5.zip |
rename generate-key.sh to generate-key
Diffstat (limited to 'generate-key')
-rwxr-xr-x | generate-key | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/generate-key b/generate-key new file mode 100755 index 0000000..d41a90c --- /dev/null +++ b/generate-key @@ -0,0 +1,32 @@ +#!/bin/sh + +. ./config + +echo 'Today is :' +date +echo '(check if the date is correct and press enter)' +read z + +chmod 700 "$GPGHOMEDIR" + +echo "Generate key :" +gpg --homedir "$GPGHOMEDIR" --batch --gen-key "$INPUTDIR/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" + +echo "Generate passphrase" +./random-passphrase > "$passphrase" +gpg -c --passphrase-file "$passphrase" "$seckey" +rm -f "$seckey" + +#TODO : split secret key using ssss-split + |