mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
Show which user ID a bad self-sig (invald sig or unsupported public key
algorithm) resides on.
This commit is contained in:
parent
22bc1b3a5e
commit
8cb9dd7a39
@ -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.
|
||||
|
15
g10/import.c
15
g10/import.c
@ -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 */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user