diff --git a/g10/keyedit.c b/g10/keyedit.c index 892da1ad5..c591600a5 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -3053,6 +3053,8 @@ keyedit_quick_revuid (ctrl_t ctrl, const char *username, const char *uidtorev) } } + log_error (_("User ID revocation failed: %s\n"), gpg_strerror (GPG_ERR_NOT_FOUND)); + leave: release_kbnode (keyblock); keydb_release (kdbhd); diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm index 7ede5e9b5..8ceb03500 100755 --- a/tests/openpgp/quick-key-manipulation.scm +++ b/tests/openpgp/quick-key-manipulation.scm @@ -37,6 +37,7 @@ (define alpha "Alpha ") (define bravo "Bravo ") +(define charlie "Charlie ") (define (key-data key) (filter (lambda (x) (or (string=? (car x) "pub") @@ -79,6 +80,11 @@ (info "Checking that we can revoke a user ID...") (call-check `(,@GPG --quick-revoke-uid ,(exact bravo) ,alpha)) +(info "Checking that we get an error revoking a non-existant user ID.") +(catch '() + (call-check `(,@GPG --quick-revoke-uid ,(exact bravo) ,charlie)) + (error "Expected an error, but get none.")) + (assert (= 1 (count-uids-of-secret-key bravo))) (info "Checking that we can change the expiration time.")