Home GnuPG
Diffusion GnuPG 332098a0f717

sm: Fix issuer certificate look error due to legacy error code.

Description

sm: Fix issuer certificate look error due to legacy error code.

* sm/certchain.c (find_up): Get rid of the legacy return code -1 and
chnage var name rc to err.
(gpgsm_walk_cert_chain): Change var name rc to err.
(do_validate_chain): Get rid of the legacy return code -1.
* sm/keydb.c (keydb_search): Replace return code -1 by
GPG_ERR_NOT_FOUND.
(keydb_set_cert_flags): Replace return code -1 by GPG_ERR_NOT_FOUND.
* sm/certchain.c (find_up_search_by_keyid): Ditto.
(find_up_external, find_up, find_up_dirmngr): Ditto.
(gpgsm_walk_cert_chain): Ditto.
(get_regtp_ca_info): Ditto.
* sm/certlist.c (gpgsm_add_to_certlist): Ditto.
(gpgsm_find_cert): Ditto.
* sm/delete.c (delete_one): Ditto.
* sm/export.c (gpgsm_export): Ditto.
(gpgsm_p12_export): Ditto.
* sm/import.c (gpgsm_import_files): Ditto.
* sm/keylist.c (list_cert_colon): Ditto.
(list_internal_keys): Ditto.
* sm/sign.c (add_certificate_list): Ditto.

This bug was detected while fixing
Backported-from-master: 473b83d1b9efe51fcca68708580597dddf3f50b7

Some extra code has been taken from
commit ed6ebb696e4063dc664d7ee74fc492025881c459

Details

Provenance
wernerAuthored on Feb 25 2021, 9:00 AM
Parents
rGd6aa8bcbbbec: scd: Parse "Algorithm Information" data object in scdaemon.
Branches
Unknown
Tags
Unknown
Tasks
T4757: gpgsm --import --quiet is not quiet