summaryrefslogtreecommitdiffstats
path: root/dirmngr/server.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-03-16 14:52:28 +0100
committerWerner Koch <wk@gnupg.org>2023-03-16 14:52:28 +0100
commitf5347fbc25aee7adce6244112aae639b0ff00ccd (patch)
treeeaf144e3170939ca569d23b6d87770ae237e23d5 /dirmngr/server.c
parentgpgsm: New option --no-pretty-dn (diff)
downloadgnupg2-f5347fbc25aee7adce6244112aae639b0ff00ccd.tar.xz
gnupg2-f5347fbc25aee7adce6244112aae639b0ff00ccd.zip
dirmngr: Add framework to implement a fake CRL feature.
* dirmngr/fakecrl.c: New. * dirmngr/dirmngr.h (opt): Add fake_crl. * dirmngr/dirmngr.c (enum cmd_and_opt_values): Add oFakeCRL. (opts): Add "fake-crl" (parse_rereadable_options): Set opt.fake_crl. * dirmngr/server.c (cmd_isvalid): Take care of fakce CRLs.
Diffstat (limited to '')
-rw-r--r--dirmngr/server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dirmngr/server.c b/dirmngr/server.c
index cd71592a4..cd0839aad 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -1339,6 +1339,10 @@ cmd_isvalid (assuan_context_t ctx, char *line)
}
else if (only_ocsp)
err = gpg_error (GPG_ERR_NO_CRL_KNOWN);
+ else if (opt.fake_crl && (err = fakecrl_isvalid (ctrl, issuerhash, serialno)))
+ {
+ /* We already got the error code. */
+ }
else
{
switch (crl_cache_isvalid (ctrl,
@@ -1377,7 +1381,7 @@ cmd_isvalid (assuan_context_t ctx, char *line)
/* If the line contains a SHA-1 fingerprint as the first argument,
- return the FPR vuffer on success. The function checks that the
+ return the FPR buffer on success. The function checks that the
fingerprint consists of valid characters and prints and error
message if it does not and returns NULL. Fingerprints are
considered optional and thus no explicit error is returned. NULL is