diff options
-rwxr-xr-x | generate-key.sh | 8 |
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 |