Home GnuPG
Diffusion Scute 819009a5a782

Avoid segv in case of a MISSING_KEY error.

Description

Avoid segv in case of a MISSING_KEY error.

* src/table.c (scute_table_first): Allow NULL for table.
* src/cert.h (struct cert): Add field has_private.
* src/cert-gpgsm.c (keylist_cb_line): Set hash_private.
* src/gpgsm.c (search_cb): Make sure only a cert with private key is
added as private.

gpg-agent sometimes returns MISSING_KEY error. For example if a
private key file has no proper Key entry. In this case
scute_table_first is called with NULL.

The second part is just to make thinks more robust.

Details

Provenance
wernerAuthored on Aug 22 2022, 7:59 AM
gniibeCommitted on Sep 28 2022, 7:49 AM
Parents
rS9a61a3267f7d: Avoid endless loop due to bogus certificate chains.
Branches
Unknown
Tags
Unknown