mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
MDC feature support and other stuff
This commit is contained in:
parent
64d586ef17
commit
bab40b52cd
24 changed files with 404 additions and 331 deletions
14
g10/delkey.c
14
g10/delkey.c
|
@ -61,8 +61,18 @@ do_delete_key( const char *username, int secret, int *r_sec_avail )
|
|||
|
||||
*r_sec_avail = 0;
|
||||
/* search the userid */
|
||||
rc = secret? find_secret_keyblock_byname( &kbpos, username )
|
||||
: find_keyblock_byname( &kbpos, username );
|
||||
if (secret
|
||||
&& classify_user_id (username, keyid, NULL, NULL, NULL) == 11) {
|
||||
/* if the user supplied a long keyID we use the direct search
|
||||
methods which allows us to delete a key if the
|
||||
corresponding secret key is missing */
|
||||
rc = find_secret_keyblock_direct (&kbpos, keyid);
|
||||
}
|
||||
else if (secret)
|
||||
rc = find_secret_keyblock_byname (&kbpos, username);
|
||||
else
|
||||
rc = find_keyblock_byname (&kbpos, username);
|
||||
|
||||
if( rc ) {
|
||||
log_error(_("%s: user not found\n"), username );
|
||||
write_status_text( STATUS_DELETE_PROBLEM, "1" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue