[git] GnuPG - branch, master, updated. gnupg-2.1.19-4-g62d21a4

by Justus Winter cvs at cvs.gnupg.org
Thu Mar 2 11:41:40 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  62d21a4ab4029b32ea129f1cf3a0e1f22e2fb7b0 (commit)
      from  74cb3b230c1f99afc5fd09bccc24186a63b154b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 62d21a4ab4029b32ea129f1cf3a0e1f22e2fb7b0
Author: Justus Winter <justus at g10code.com>
Date:   Thu Mar 2 11:39:00 2017 +0100

    g10: Signal an error when trying to revoke non-existant UID.
    
    * g10/keyedit.c (keyedit_quick_revuid): Signal an error when trying to
    revoke non-existant UID.
    * tests/openpgp/quick-key-manipulation.scm: Test that.
    
    GnuPG-bug-id: 2962
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/g10/keyedit.c b/g10/keyedit.c
index 892da1a..c591600 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 7ede5e9..8ceb035 100755
--- a/tests/openpgp/quick-key-manipulation.scm
+++ b/tests/openpgp/quick-key-manipulation.scm
@@ -37,6 +37,7 @@
 
 (define alpha "Alpha <alpha at invalid.example.net>")
 (define bravo "Bravo <bravo at invalid.example.net>")
+(define charlie "Charlie <charlie at invalid.example.net>")
 
 (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 `(, at GPG --quick-revoke-uid ,(exact bravo) ,alpha))
 
+(info "Checking that we get an error revoking a non-existant user ID.")
+(catch '()
+       (call-check `(, at 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.")

-----------------------------------------------------------------------

Summary of changes:
 g10/keyedit.c                            | 2 ++
 tests/openpgp/quick-key-manipulation.scm | 6 ++++++
 2 files changed, 8 insertions(+)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list