aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Brubaker <jbru362@gmail.com>2022-06-10 09:49:08 -0400
committerJeremy Brubaker <jbru362@gmail.com>2022-06-10 09:49:08 -0400
commit27247aceda7754a8803bbc107fa9a5a08be05c02 (patch)
tree8d6ac3d6c15ce478571a9224d332fcd7c1a7d816
parentc56ca54c5c8606b88cafe72d941cfcddfddaffc3 (diff)
downloadanypinentry-27247aceda7754a8803bbc107fa9a5a08be05c02.tar.gz
anypinentry-27247aceda7754a8803bbc107fa9a5a08be05c02.zip
Implement 'RESET' command
Reset everything to defaults
-rwxr-xr-xanypinentry17
1 files changed, 14 insertions, 3 deletions
diff --git a/anypinentry b/anypinentry
index d5e1a35..e17bab0 100755
--- a/anypinentry
+++ b/anypinentry
@@ -8,9 +8,10 @@ if [ -z "$DISPLAY" ]; then
DISPLAY=":1";
export DISPLAY;
fi
+prompt_string_default="PIN: "
title="";
-prompt_string="PIN: ";
+prompt_string="$prompt_string_default";
description="";
keyinfo="";
repeat="";
@@ -46,7 +47,17 @@ not_implemented_error() { echo "ERR 536870981 Not implemented <User defined sour
unknown_error() { echo "ERR 536871187 Unknown IPC command <User defined source 1>"; }
-
+reset() {
+ description=
+ prompt_string="$prompt_string_default"
+ keyinfo=
+ repeat=
+ error__password_mismatch=
+ setok=
+ setnotok=
+ setcancel=
+ title=
+}
save_option() {
echo "OK";
@@ -134,7 +145,7 @@ interpret_command() {
OPTION) save_option "$data" ;;
BYE) echo "OK closing connection"; exit 0 ;;
AUTH) not_implemented_error ;;
- RESET) not_implemented_error ;;
+ RESET) reset ;;
END) not_implemented_error ;;
HELP) pinentry_help ;;
SETDESC) description="$data"; echo "OK" ;;