From 2c47c6662793ad2220a97e8aff1acb0aca4099bf Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 23 Jun 2022 09:23:47 +0900 Subject: [PATCH] agent: Fix KEYATTR command for --delete option. * agent/command.c (cmd_keyattr): Write the result. -- Signed-off-by: NIIBE Yutaka --- agent/command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/command.c b/agent/command.c index 50196f432..3c17a53ad 100644 --- a/agent/command.c +++ b/agent/command.c @@ -1253,7 +1253,10 @@ cmd_keyattr (assuan_context_t ctx, char *line) if (opt_delete) { if (e) - nvc_delete (keymeta, e); + { + nvc_delete (keymeta, e); + goto key_attr_write; + } } else if (e) { @@ -1265,6 +1268,7 @@ cmd_keyattr (assuan_context_t ctx, char *line) else if (argc == 3) { err = nvc_set (keymeta, argv[1], argv[2]); + key_attr_write: if (!err) err = nvc_set_private_key (keymeta, s_key); if (!err)