From 3488be50ec671c4e082766893f2ba6178716b978 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 23 May 2018 15:07:48 -0300 Subject: Increase default password size at pwgen --- lib/keyringer/actions/pwgen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/keyringer/actions') diff --git a/lib/keyringer/actions/pwgen b/lib/keyringer/actions/pwgen index 3c03681..5f25447 100755 --- a/lib/keyringer/actions/pwgen +++ b/lib/keyringer/actions/pwgen @@ -13,7 +13,7 @@ FILE="$2" # Generates a random passphrase function keyringer_pwgen { - ENTROPY_BYTES=${1:-20} # in bytes + ENTROPY_BYTES=${1:-40} # in bytes ENTROPY_SOURCE="${ENTROPY_SOURCE:-/dev/urandom}" # Strip possible newlines if output is wrapped. -- cgit v1.2.3 From f90e70bb2c221dc6046bf65f7931164d5ca6801f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 23 May 2018 16:17:54 -0300 Subject: Automatically generate passphrase at genkeys_gpg --- ChangeLog | 4 ++++ lib/keyringer/actions/genkeys | 30 ++++++++++++++++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) (limited to 'lib/keyringer/actions') diff --git a/ChangeLog b/ChangeLog index 69a4751..449017c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-11-23 - unreleased - Silvio Rhatto + + Automatically generate passphrase at genkeys_gpg + 2017-11-03 - 0.5.2 - Silvio Rhatto Fixed incorrect exit statement on append, thanks jamie (#79) diff --git a/lib/keyringer/actions/genkeys b/lib/keyringer/actions/genkeys index 634c847..deacbfd 100755 --- a/lib/keyringer/actions/genkeys +++ b/lib/keyringer/actions/genkeys @@ -34,23 +34,25 @@ function genkeys_ssh { function genkeys_gpg { echo "Make sure that $KEYDIR is atop of an encrypted volume." - passphrase="no" - passphrase_confirm="confirm" + #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" + #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 + # if [ "$passphrase" != "$passphrase_confirm" ]; then + # echo "Password don't match." + # fi + #done + + keyringer_exec pwgen "$BASEDIR" "$FILE.passwd" + passphrase="`keyringer_exec decrypt "$BASEDIR" "$FILE.passwd"`" # TODO: insert random bytes # TODO: custom Name-Comment and Name-Email - # TODO: allow for empty passphrases $GPG --homedir "$TMPWORK" --gen-key --batch < Date: Mon, 19 Feb 2018 17:45:03 +0100 Subject: Replace head -c by dd The '-c' (count bytes) option is not a POSIX.1 option, therefore it is not available on OpenBSD. Replace 'head -c' with 'dd'. Signed-off-by: Silvio Rhatto --- lib/keyringer/actions/pwgen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/keyringer/actions') diff --git a/lib/keyringer/actions/pwgen b/lib/keyringer/actions/pwgen index 5f25447..ab5cb84 100755 --- a/lib/keyringer/actions/pwgen +++ b/lib/keyringer/actions/pwgen @@ -18,7 +18,7 @@ function keyringer_pwgen { # Strip possible newlines if output is wrapped. # Also strip trailing = signs as they add nothing to the password's entropy. - head -c $ENTROPY_BYTES $ENTROPY_SOURCE | base64 | tr -d '\n=' + dd bs=1 count=$ENTROPY_BYTES if=$ENTROPY_SOURCE | base64 | tr -d '\n=' echo } -- cgit v1.2.3 From 957d506490ad9447ac7feacba5f96e8404530528 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 30 May 2018 13:24:53 -0300 Subject: Adds status=none at on invocation at keyringer_pwgen --- lib/keyringer/actions/pwgen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/keyringer/actions') diff --git a/lib/keyringer/actions/pwgen b/lib/keyringer/actions/pwgen index ab5cb84..e1e8947 100755 --- a/lib/keyringer/actions/pwgen +++ b/lib/keyringer/actions/pwgen @@ -18,7 +18,7 @@ function keyringer_pwgen { # Strip possible newlines if output is wrapped. # Also strip trailing = signs as they add nothing to the password's entropy. - dd bs=1 count=$ENTROPY_BYTES if=$ENTROPY_SOURCE | base64 | tr -d '\n=' + dd bs=1 count=$ENTROPY_BYTES if=$ENTROPY_SOURCE status=none | base64 | tr -d '\n=' echo } -- cgit v1.2.3