mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
g10: Fix checking key for signature validation.
* g10/sig-check.c (signature_check2): Not only subkey, but also primary key should have flags.valid=1. -- (backport of master commit 6f284e6ed63f514b15fe610f490ffcefc87a2164) Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
0f6bda4ccd
commit
f474b161f6
@ -76,9 +76,9 @@ signature_check2( PKT_signature *sig, MD_HANDLE digest, u32 *r_expiredate,
|
||||
}
|
||||
else if( get_pubkey( pk, sig->keyid ) )
|
||||
rc = G10ERR_NO_PUBKEY;
|
||||
else if(!pk->is_valid && !pk->is_primary)
|
||||
else if(!pk->is_valid)
|
||||
rc=G10ERR_BAD_PUBKEY; /* you cannot have a good sig from an
|
||||
invalid subkey */
|
||||
invalid key */
|
||||
else
|
||||
{
|
||||
if(r_expiredate)
|
||||
|
Loading…
x
Reference in New Issue
Block a user