mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Do not allow the user to revoke the last valid UID.
* g10/keyedit.c (keyedit_quick_revuid): Merge self signatures, then make sure that we do not revoke the last valid UID. (menu_revuid): Make sure that we do not revoke the last valid UID. * tests/openpgp/quick-key-manipulation.scm: Demonstrate that '--quick-revoke-uid' can not be used to revoke the last valid UID. GnuPG-bug-id: 2960 Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
80fb1a8a05
commit
591b6a9d87
2 changed files with 45 additions and 1 deletions
|
@ -81,6 +81,11 @@
|
|||
(call-check `(,@GPG --quick-revoke-uid ,(exact bravo) ,charlie))
|
||||
(error "Expected an error, but get none."))
|
||||
|
||||
(info "Checking that we get an error revoking the last valid user ID.")
|
||||
(catch '()
|
||||
(call-check `(,@GPG --quick-revoke-uid ,(exact bravo) ,bravo))
|
||||
(error "Expected an error, but get none."))
|
||||
|
||||
(assert (= 1 (count-uids-of-secret-key bravo)))
|
||||
|
||||
(info "Checking that we can change the expiration time.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue