[Pkg-gnupg-commit] [gnupg2] 42/118: g10: When asking about a TOFU binding conflict, default to unknown.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 15 18:25:05 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch encoding-and-speling
in repository gnupg2.
commit 3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412
Author: Neal H. Walfield <neal at g10code.com>
Date: Thu Sep 1 14:31:31 2016 +0200
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 <neal at g10code.com>
---
g10/tofu.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/g10/tofu.c b/g10/tofu.c
index 2161cee..47c68fe 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list