From 0feffd76c76b6e1481a0fc0dc469eddb20229625 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 3 Feb 2011 12:02:06 +0000 Subject: encrypt secret key using passphrase --- generate-key.sh | 8 ++++++-- 1 file 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 -- cgit v1.2.1