1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpgsm: Set validity flag in keylisting to n for untrusted root cert.

* sm/keylist.c (list_cert_colon): Map not_trusted to 'n' for non-root
certs like we do for root certs.
--

GnuPG-bug-id: 6841
This commit is contained in:
Werner Koch 2023-11-27 12:34:38 +01:00
parent 4c456bf075
commit 73aa6dc6e4
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -532,6 +532,8 @@ list_cert_colon (ctrl_t ctrl, ksba_cert_t cert, unsigned int validity,
{ {
if (gpgsm_cert_has_well_known_private_key (cert)) if (gpgsm_cert_has_well_known_private_key (cert))
*truststring = 'w'; /* Well, this is dummy CA. */ *truststring = 'w'; /* Well, this is dummy CA. */
else if (gpg_err_code (valerr) == GPG_ERR_NOT_TRUSTED)
*truststring = 'n'; /* Likely the root cert is not trusted. */
else else
*truststring = 'i'; *truststring = 'i';
} }