diff options
author | Justus Winter <[email protected]> | 2017-03-02 13:14:55 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-03-07 12:46:20 +0000 |
commit | 591b6a9d879cbcabb089d89a26d3c3e0306054e1 (patch) | |
tree | 62b9ab47dda0b0571d85516e92701768badb17dc /tests | |
parent | tools: Removal of -Icommon. (diff) | |
download | gnupg-591b6a9d879cbcabb089d89a26d3c3e0306054e1.tar.gz gnupg-591b6a9d879cbcabb089d89a26d3c3e0306054e1.zip |
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 <[email protected]>
Diffstat (limited to '')
-rwxr-xr-x | tests/openpgp/quick-key-manipulation.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/openpgp/quick-key-manipulation.scm b/tests/openpgp/quick-key-manipulation.scm index 08ef62613..9fd5b6bb0 100755 --- a/tests/openpgp/quick-key-manipulation.scm +++ b/tests/openpgp/quick-key-manipulation.scm @@ -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.") |