1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-02 02:48:57 +02:00

Show which user ID a bad self-sig (invald sig or unsupported public key

algorithm) resides on.
This commit is contained in:
David Shaw 2002-03-13 20:20:14 +00:00
parent 22bc1b3a5e
commit 8cb9dd7a39
2 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,8 @@
2002-03-13 David Shaw <dshaw@jabberwocky.com>
* import.c (chk_self_sigs): Show which user ID a bad self-sig
(invald sig or unsupported public key algorithm) resides on.
* import.c (chk_self_sigs): any valid self-sig should mark a user
ID or subkey as valid - otherwise, an attacker could DoS the user
by inventing a bogus invalid self-signature.

View File

@ -820,10 +820,17 @@ chk_self_sigs( const char *fname, KBNODE keyblock,
if(!(unode->flag&1)) {
rc = check_key_signature( keyblock, n, NULL);
if( rc )
log_info( rc == G10ERR_PUBKEY_ALGO ?
_("key %08lX: unsupported public key algorithm\n"):
_("key %08lX: invalid self-signature\n"),
(ulong)keyid[1]);
{
char *p=utf8_to_native(unode->pkt->pkt.user_id->name,
strlen(unode->pkt->pkt.user_id->name),0);
log_info( rc == G10ERR_PUBKEY_ALGO ?
_("key %08lX: unsupported public key "
"algorithm on user id \"%s\"\n"):
_("key %08lX: invalid self-signature "
"on user id \"%s\"\n"),
(ulong)keyid[1],p);
m_free(p);
}
else
unode->flag |= 1; /* mark that signature checked */
}