aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-02-03 12:02:06 +0000
committerNicolas Vigier <boklm@mageia.org>2011-02-03 12:02:06 +0000
commit0feffd76c76b6e1481a0fc0dc469eddb20229625 (patch)
treec366f51dbd8b3a9ce083bc0a345ce44fb5b2ae8b
parent9c79009ae82401e5489bf946c8635c3c5912432a (diff)
downloadgpg-0feffd76c76b6e1481a0fc0dc469eddb20229625.tar
gpg-0feffd76c76b6e1481a0fc0dc469eddb20229625.tar.gz
gpg-0feffd76c76b6e1481a0fc0dc469eddb20229625.tar.bz2
gpg-0feffd76c76b6e1481a0fc0dc469eddb20229625.tar.xz
gpg-0feffd76c76b6e1481a0fc0dc469eddb20229625.zip
encrypt secret key using passphrase
-rwxr-xr-xgenerate-key.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/generate-key.sh b/generate-key.sh
index ffa2a1c..51ec8e1 100755
--- a/generate-key.sh
+++ b/generate-key.sh
@@ -6,7 +6,9 @@ PRIVDIR="./private"
INPUTDIR="./input"
pubkey="$PUBDIR/mageia-board-pubkey.gpg"
-seckey="$PRIVDIR/mageia-board-seckey.gpg"
+seckey="$PRIVDIR/mageia-board-seckey"
+seckey_e="$PRIVDIR/mageia-board-seckey.gpg"
+passphrase="$PRIVDIR/passphrase"
echo 'Today is :'
date
@@ -30,7 +32,9 @@ gpg --homedir homedir --export-secret-keys -a > "$seckey"
rm -Rf "$GPGHOMEDIR"
echo "Generate passphrase"
-./random-passphrase > "$PRIVDIR/passphrase"
+./random-passphrase > "$passphrase"
+gpg -c --passphrase-file "$passphrase" "$seckey"
+rm -f "$seckey"
#TODO : split secret key using ssss-split