gpg: Don't consider unknown keys as non-compliant while decrypting.

* g10/mainproc.c (proc_encrypted):  Change compliance logic.
--

For the description of the proplem see
  https://dev.gnupg.org/T6205#163306

GnuPG-bug-id: 6205
This commit is contained in:
Werner Koch 2022-09-22 10:07:42 +02:00
parent 289fbc550d
commit 05b7e4a405
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 4 additions and 4 deletions

View File

@ -792,15 +792,15 @@ proc_encrypted (CTX c, PACKET *pkt)
compliant = 0;
}
/* Check that every public key used to encrypt the session key
/* Check that every known public key used to encrypt the session key
* is compliant. */
for (i = c->pkenc_list; i && compliant; i = i->next)
{
memset (pk, 0, sizeof *pk);
pk->pubkey_algo = i->pubkey_algo;
if (get_pubkey (c->ctrl, pk, i->kid) != 0
|| ! gnupg_pk_is_compliant (CO_DE_VS, pk->pubkey_algo, 0,
pk->pkey, nbits_from_pk (pk), NULL))
if (!get_pubkey (c->ctrl, pk, i->kid)
&& !gnupg_pk_is_compliant (CO_DE_VS, pk->pubkey_algo, 0,
pk->pkey, nbits_from_pk (pk), NULL))
compliant = 0;
release_public_key_parts (pk);
}