diff options
author | Neal H. Walfield <[email protected]> | 2016-09-01 12:31:31 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2016-09-01 12:31:31 +0000 |
commit | 3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412 (patch) | |
tree | bb3208e3fa279a22b05fd60d27dd1cb0f3555998 | |
parent | g10: Add support for TRUST_NEVER. (diff) | |
download | gnupg-3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412.tar.gz gnupg-3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412.zip |
g10: When asking about a TOFU binding conflict, default to unknown.
* g10/tofu.c (ask_about_binding): Default to unknown.
--
Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | g10/tofu.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/g10/tofu.c b/g10/tofu.c index 2161cee0d..47c68fe8e 100644 --- a/g10/tofu.c +++ b/g10/tofu.c @@ -1591,9 +1591,17 @@ ask_about_binding (ctrl_t ctrl, cpr_kill_prompt (); if (*response == CONTROL_L) tty_printf ("%s", prompt); - else if (strlen (response) == 1) + else if (!response[0]) + /* Default to unknown. Don't save it. */ + { + tty_printf (_("Defaulting to unknown.")); + *policy = TOFU_POLICY_UNKNOWN; + break; + } + else if (!response[1]) { char *choice = strchr (choices, *response); + if (choice) { int c = ((size_t) choice - (size_t) choices) / 2; |