diff options
author | Werner Koch <[email protected]> | 2025-05-13 13:18:39 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-05-13 13:18:39 +0000 |
commit | e7a9bd320561105d3b8afdc6548f4d8e182e47f6 (patch) | |
tree | d21875a56cba9d3475628a5bad55615be4554443 | |
parent | agent: We should use a macro for the keygrip len in new code. (diff) | |
download | gnupg-e7a9bd320561105d3b8afdc6548f4d8e182e47f6.tar.gz gnupg-e7a9bd320561105d3b8afdc6548f4d8e182e47f6.zip |
gpgsm: Just print a note for an empty subject during import.
* sm/certchain.c (gpgsm_walk_cert_chain): Handle an empty subject.
--
During import a certificate was imported but gpgsm used log_error when
trying to figure out whether this is a root cert. This patch changes
this to just print a note.
GnuPG-bug-id: 7171
-rw-r--r-- | sm/certchain.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sm/certchain.c b/sm/certchain.c index 0061e8476..e5272b983 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -1081,14 +1081,10 @@ gpgsm_walk_cert_chain (ctrl_t ctrl, ksba_cert_t start, ksba_cert_t *r_next) err = gpg_error (GPG_ERR_BAD_CERT); goto leave; } - if (!subject) - { - log_error ("no subject found in certificate\n"); - err = gpg_error (GPG_ERR_BAD_CERT); - goto leave; - } + if (!subject && !opt.quiet) + log_info ("Note: no subject found in certificate\n"); - if (is_root_cert (start, issuer, subject)) + if (subject && is_root_cert (start, issuer, subject)) { err = gpg_error (GPG_ERR_NOT_FOUND); /* we are at the root */ goto leave; |