diff --git a/g10/ChangeLog b/g10/ChangeLog index 9a76f2166..330a60164 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,8 @@ 2010-05-07 Werner Koch + * import.c (chk_self_sigs): Check direct key signatures. Fixes + bug#1223. + * import.c (chk_self_sigs): Re-indent and slighly re-arrange code. Use test macros for the sig class. diff --git a/g10/import.c b/g10/import.c index 5118bc514..5d51e9295 100644 --- a/g10/import.c +++ b/g10/import.c @@ -1431,6 +1431,19 @@ chk_self_sigs( const char *fname, KBNODE keyblock, unode->flag |= 1; /* Mark that signature checked. */ } } + else if (IS_KEY_SIG (sig)) + { + rc = check_key_signature (keyblock, n, NULL); + if ( rc ) + { + if (opt.verbose) + log_info (gpg_err_code (rc) == G10ERR_PUBKEY_ALGO ? + _("key %s: unsupported public key algorithm\n"): + _("key %s: invalid direct key signature\n"), + keystr (keyid)); + n->flag |= 4; + } + } else if ( IS_SUBKEY_SIG (sig) ) { /* Note that this works based solely on the timestamps like