1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-05-14 08:13:25 +02:00

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
This commit is contained in:
Werner Koch 2025-05-13 15:18:39 +02:00
parent edd01d8fc4
commit e57a2e65d9
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -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); err = gpg_error (GPG_ERR_BAD_CERT);
goto leave; goto leave;
} }
if (!subject) if (!subject && !opt.quiet)
{ log_info ("Note: no subject found in certificate\n");
log_error ("no subject found in certificate\n");
err = gpg_error (GPG_ERR_BAD_CERT);
goto leave;
}
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 */ err = gpg_error (GPG_ERR_NOT_FOUND); /* we are at the root */
goto leave; goto leave;