Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Commit

Permalink
Add basic pass
Browse files Browse the repository at this point in the history
helps with #88
  • Loading branch information
diveshuttam committed Aug 20, 2018
1 parent 81e66de commit eda2d1c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/gui/key/pass.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
gui_key_pass(){
message error "<tt> ${FUNCNAME[0]} \n not implemented yet </tt>"
# TODO: maybe we should give option for removing passphrase
# though it would require change in cmd_key_pass

# This is same as cli part. TODO: just change the pinentry to gui pinentry
output=$(call cmd_key_pass 2>&1)
err=$?
is_true $DEBUG && echo "$output"

# TODO improve messages
if [[ $err == 0 ]]; then
message info "Passphrase changed"
else
fail_details=$(echo "$output" | grep '^gpg:' | uniq | pango_raw)
message error "Failed to change passphrase for <tt>$GPG_KEY</tt>.\n <tt>$fail_details</tt>"
return 1
fi
}
#
# This file is part of EasyGnuPG. EasyGnuPG is a wrapper around GnuPG
Expand Down

0 comments on commit eda2d1c

Please sign in to comment.