aboutsummaryrefslogtreecommitdiffstats
path: root/generate-key
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-02-03 15:51:13 +0000
committerNicolas Vigier <boklm@mageia.org>2011-02-03 15:51:13 +0000
commitfbe7c0926b81390fd6743cc45828cdb485319dd5 (patch)
tree9907d5701b64cb078447ccf251686b3e2aca2bc0 /generate-key
parent72a606f0240d8c8800a6311d0f3caf9aabfabb58 (diff)
downloadgpg-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-xgenerate-key32
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
+