aboutsummaryrefslogtreecommitdiffstats
path: root/sm/gpgsm.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2022-12-05 15:42:08 +0000
committerWerner Koch <[email protected]>2022-12-05 15:42:08 +0000
commitb6abaed2b5f6a6e52069f370c61006abdc81cdf5 (patch)
tree3aaca56d2678d54c1bc60b67c85602b44b5daf28 /sm/gpgsm.h
parentgpgsm: Silence the "non-critical certificate policy not allowed". (diff)
downloadgnupg-b6abaed2b5f6a6e52069f370c61006abdc81cdf5.tar.gz
gnupg-b6abaed2b5f6a6e52069f370c61006abdc81cdf5.zip
gpgsm: Print revocation date and reason in cert listings.
* dirmngr/ocsp.c (ocsp_isvalid): Add args r_revoked_at and r_revocation_reason. * dirmngr/server.c (cmd_isvalid): Emit a new REVOCATIONINFO status. (cmd_checkocsp): Ditto. * sm/call-dirmngr.c (struct isvalid_status_parm_s): Add new fields. (isvalid_status_cb): Parse REVOCATIONINFO. (gpgsm_dirmngr_isvalid): Add args r_revoked_at and r_revocation_reason. * sm/gpgsm.h (struct server_control_s): Add fields revoked_art and revocation_reason. * sm/keylist.c (list_cert_raw): Print revocation date. (list_cert_std): Ditto. -- Note that for now we do this only for OCSP because it is an important piece of information when using the chain model. For a sample key see commit 7fa1d3cc821dca1ea8e1c80a0bdd527177c185ee.
Diffstat (limited to 'sm/gpgsm.h')
-rw-r--r--sm/gpgsm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sm/gpgsm.h b/sm/gpgsm.h
index b0ed8891c..ced2d679f 100644
--- a/sm/gpgsm.h
+++ b/sm/gpgsm.h
@@ -264,6 +264,10 @@ struct server_control_s
/* The current time. Used as a helper in certchain.c. */
ksba_isotime_t current_time;
+
+ /* The revocation info. Used as a helper inc ertchain.c */
+ gnupg_isotime_t revoked_at;
+ char *revocation_reason;
};
@@ -496,7 +500,9 @@ gpg_error_t gpgsm_agent_export_key (ctrl_t ctrl, const char *keygrip,
/*-- call-dirmngr.c --*/
gpg_error_t gpgsm_dirmngr_isvalid (ctrl_t ctrl,
ksba_cert_t cert, ksba_cert_t issuer_cert,
- int use_ocsp);
+ int use_ocsp,
+ gnupg_isotime_t r_revoked_at,
+ char **r_reason);
int gpgsm_dirmngr_lookup (ctrl_t ctrl, strlist_t names, const char *uri,
int cache_only,
void (*cb)(void*, ksba_cert_t), void *cb_value);