mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-29 08:14:08 +00:00
Use -r option to shortcut interactive tomb password popup
This commit is contained in:
parent
9ee0a1550e
commit
6c0d89cab1
13
tomb
Normal file → Executable file
13
tomb
Normal file → Executable file
@ -889,7 +889,12 @@ _load_key() {
|
||||
[[ -z $keyfile ]] && {
|
||||
_failure "This operation requires a key file to be specified using the -k option." }
|
||||
|
||||
if [[ $keyfile == "-" ]]; then
|
||||
if option_is_set -r; then
|
||||
_verbose "load_key delegating password handling to GnuPG"
|
||||
_message "Waiting for GnuPG to handle password authentication... "
|
||||
TOMBKEYFILE=$keyfile
|
||||
TOMBKEY="${mapfile[$TOMBKEYFILE]}"
|
||||
elif [[ $keyfile == "-" ]]; then
|
||||
_verbose "load_key reading from stdin."
|
||||
_message "Waiting for the key to be piped from stdin... "
|
||||
TOMBKEYFILE=stdin
|
||||
@ -1024,6 +1029,12 @@ ask_key_password() {
|
||||
_verbose "no password needed, using secret bytes from stdin"
|
||||
return 0 }
|
||||
|
||||
if option_is_set -r; then
|
||||
_verbose "no password needed, using GPG key"
|
||||
get_lukskey
|
||||
return $?
|
||||
fi
|
||||
|
||||
_message "A password is required to use key ::1 key::" $TOMBKEYFILE
|
||||
passok=0
|
||||
tombpass=""
|
||||
|
Loading…
Reference in New Issue
Block a user