aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-12-12 17:25:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-12-12 17:25:12 -0200
commit3fe08f7b15f1b58b1174249752090b1bddaaa6c0 (patch)
treeb4d0b7737a8b303333dda035f5c49d0dbeca63c9 /share
parent5c1095bde2d56e81227c2912c0717bfb8027be1d (diff)
downloadkeyringer-3fe08f7b15f1b58b1174249752090b1bddaaa6c0.tar.gz
keyringer-3fe08f7b15f1b58b1174249752090b1bddaaa6c0.tar.bz2
Passphrase confirmation at genpair_gpg
Diffstat (limited to 'share')
-rwxr-xr-xshare/keyringer/genpair16
1 files changed, 14 insertions, 2 deletions
diff --git a/share/keyringer/genpair b/share/keyringer/genpair
index 6dff7c6..d6a2b9d 100755
--- a/share/keyringer/genpair
+++ b/share/keyringer/genpair
@@ -34,8 +34,20 @@ function genpair_ssh {
# Generate a keypair, gpg version
function genpair_gpg {
echo "Make sure that $KEYDIR is atop of an encrypted volume."
- read -s -p "Enter password for the private key: " passphrase
- printf "\n"
+
+ passphrase="no"
+ passphrase_confirm="confirm"
+
+ while [ "$passphrase" != "$passphrase_confirm" ]; do
+ read -s -p "Enter password for the private key: " passphrase
+ printf "\n"
+ read -s -p "Enter password again: " passphrase_confirm
+ printf "\n"
+
+ if [ "$passphrase" != "$passphrase_confirm" ]; then
+ echo "Password don't match."
+ fi
+ done
# TODO: insert random bytes
# TODO: custom Name-Comment and Name-Email