diff options
| author | Werner Koch <[email protected]> | 2023-11-07 19:07:45 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2023-11-07 19:38:27 +0000 |
| commit | 387ee7dcbd77d19687af967901ed4818cbdb8b3c (patch) | |
| tree | 3fc63cd303b2d07454794064e4e6528df2dbf42c /sm/certchain.c | |
| parent | doc: Use the em dash to mark a break in a sentence. (diff) | |
| parent | w32: Use utf8 for the asctimestamp function. (diff) | |
| download | gnupg-387ee7dcbd77d19687af967901ed4818cbdb8b3c.tar.gz gnupg-387ee7dcbd77d19687af967901ed4818cbdb8b3c.zip | |
Merge branch 'STABLE-BRANCH-2-4'
* common/b64dec.c (b64decode): Move to ...
* common/miscellaneous.c: here.
* common/t-b64.c: Re-inroduce and keep only the b64decode test code.
Diffstat (limited to 'sm/certchain.c')
| -rw-r--r-- | sm/certchain.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sm/certchain.c b/sm/certchain.c index 84dbed696..9d0fe684b 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -2199,9 +2199,15 @@ gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime, memset (&rootca_flags, 0, sizeof rootca_flags); - rc = do_validate_chain (ctrl, cert, checktime, - r_exptime, listmode, listfp, flags, - &rootca_flags); + if ((flags & VALIDATE_FLAG_BYPASS)) + { + *retflags |= VALIDATE_FLAG_BYPASS; + rc = 0; + } + else + rc = do_validate_chain (ctrl, cert, checktime, + r_exptime, listmode, listfp, flags, + &rootca_flags); if (!rc && (flags & VALIDATE_FLAG_STEED)) { *retflags |= VALIDATE_FLAG_STEED; @@ -2223,6 +2229,8 @@ gpgsm_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime, if (opt.verbose) do_list (0, listmode, listfp, _("validation model used: %s"), + (*retflags & VALIDATE_FLAG_BYPASS)? + "bypass" : (*retflags & VALIDATE_FLAG_STEED)? "steed" : (*retflags & VALIDATE_FLAG_CHAIN_MODEL)? |
