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

gpgsm: Silence the "non-critical certificate policy not allowed".

* sm/certchain.c (check_cert_policy): Print non-critical policy
warning only in verbose mode.
This commit is contained in:
Werner Koch 2022-12-05 14:31:45 +01:00
parent 7fa1d3cc82
commit 4f1b9e3abb
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -350,7 +350,7 @@ check_cert_policy (ksba_cert_t cert, int listmode, estream_t fplist)
/* With no critical policies this is only a warning */ /* With no critical policies this is only a warning */
if (!any_critical) if (!any_critical)
{ {
if (!opt.quiet) if (opt.verbose)
do_list (0, listmode, fplist, do_list (0, listmode, fplist,
_("Note: non-critical certificate policy not allowed")); _("Note: non-critical certificate policy not allowed"));
return 0; return 0;
@ -380,7 +380,8 @@ check_cert_policy (ksba_cert_t cert, int listmode, estream_t fplist)
/* With no critical policies this is only a warning */ /* With no critical policies this is only a warning */
if (!any_critical) if (!any_critical)
{ {
do_list (0, listmode, fplist, if (opt.verbose)
do_list (0, listmode, fplist,
_("Note: non-critical certificate policy not allowed")); _("Note: non-critical certificate policy not allowed"));
return 0; return 0;
} }