gpg: Write ERROR status on delete-key cancellation
authorDaiki Ueno <ueno@gnu.org>
Mon, 9 Nov 2015 04:20:13 +0000 (13:20 +0900)
committerWerner Koch <wk@gnupg.org>
Fri, 4 Dec 2015 15:39:10 +0000 (16:39 +0100)
* g10/delkey.c (do_delete_key): Write ERROR status code with the error
location "delete_key.secret", when the user cancelled the operation on
Pinentry.
--

I changed the original patch to emit the full gpg_error_t code. -wk

g10/delkey.c

index b0a2b0d..5d0c3df 100644 (file)
@@ -201,7 +201,10 @@ do_delete_key( const char *username, int secret, int force, int *r_sec_avail )
                     firsterr = err;
                   if (gpg_err_code (err) == GPG_ERR_CANCELED
                       || gpg_err_code (err) == GPG_ERR_FULLY_CANCELED)
-                    break;
+                   {
+                     write_status_error ("delete_key.secret", err);
+                     break;
+                   }
                 }
 
             }