aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-05-13 13:18:39 +0000
committerWerner Koch <[email protected]>2025-05-13 13:21:59 +0000
commite57a2e65d93f8a400b4b643f023e4095f26fd9f6 (patch)
tree116618467fa31f827badf605643ef6eed6fd7366
parentgpg: Fully implement the group key flag. (diff)
downloadgnupg-e57a2e65d93f8a400b4b643f023e4095f26fd9f6.tar.gz
gnupg-e57a2e65d93f8a400b4b643f023e4095f26fd9f6.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.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sm/certchain.c b/sm/certchain.c
index 9d0fe684b..0c19eb0e8 100644
--- a/sm/certchain.c
+++ b/sm/certchain.c
@@ -1074,14 +1074,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;