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

* sm/certchain.c (check_cert_policy): Print non-critical policy
warning only in verbose mode.

(cherry picked from commit 4f1b9e3abb)
This commit is contained in:
Werner Koch 2022-12-05 14:31:45 +01:00
parent 2f4492f3be
commit d9271d594b
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 3 additions and 2 deletions

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 */
if (!any_critical)
{
if (!opt.quiet)
if (opt.verbose)
do_list (0, listmode, fplist,
_("Note: non-critical certificate policy not allowed"));
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 */
if (!any_critical)
{
do_list (0, listmode, fplist,
if (opt.verbose)
do_list (0, listmode, fplist,
_("Note: non-critical certificate policy not allowed"));
return 0;
}