diff options
author | Werner Koch <[email protected]> | 2015-06-29 09:03:58 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-06-29 09:06:41 +0000 |
commit | 2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073 (patch) | |
tree | e37f62f94baf893e462490dd9c874179c1ded14e /sm/certchain.c | |
parent | scd: Support button flag and AES key data for OpenPGPcard v3.0. (diff) | |
download | gnupg-2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073.tar.gz gnupg-2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073.zip |
gpgsm: Add command option "offline".
* sm/server.c (option_handler): Add "offline".
(cmd_getinfo): Ditto.
* sm/certchain.c (is_cert_still_valid):
(do_validate_chain):
* sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value
of --disable-dirmngr.
* sm/call-dirmngr.c (start_dirmngr_ext): Better also check for
ctrl->offline.
--
Adding this option makes it easier to implement the corresponding
feature in gpgme.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'sm/certchain.c')
-rw-r--r-- | sm/certchain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sm/certchain.c b/sm/certchain.c index 5e7121caa..579ca9e74 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -957,7 +957,7 @@ is_cert_still_valid (ctrl_t ctrl, int force_ocsp, int lm, estream_t fp, { gpg_error_t err; - if (opt.no_crl_check && !ctrl->use_ocsp) + if (ctrl->offline || (opt.no_crl_check && !ctrl->use_ocsp)) { audit_log_ok (ctrl->audit, AUDIT_CRL_CHECK, gpg_error (GPG_ERR_NOT_ENABLED)); @@ -1749,9 +1749,9 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, if (opt.no_policy_check) log_info ("policies not checked due to %s option\n", "--disable-policy-checks"); - if (opt.no_crl_check && !ctrl->use_ocsp) + if (ctrl->offline || (opt.no_crl_check && !ctrl->use_ocsp)) log_info ("CRLs not checked due to %s option\n", - "--disable-crl-checks"); + ctrl->offline ? "offline" : "--disable-crl-checks"); } if (!rc) |