Home GnuPG
Diffusion Scute 868e28e407f9

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
Parents
rSca9b9a4d9eed: Avoid endless loop due to bogus certificate chains.
Branches
Unknown
Tags
Unknown