mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
dirmngr: New option --ignore-crl-extensions.
* dirmngr/dirmngr.c (oIgnoreCRLExtension): New. (opts): Add --ignore-crl-extension. (parse_rereadable_options): Add to list/ * dirmngr/dirmngr.h (opt): Add ignored_crl_extensions. * dirmngr/crlcache.c (crl_cache_insert): Implement option. -- This option is is useful for debugging problems with new CRL extensions. It is similar to --ignore-cert-extension. GnuPG-bug-id: 6545
This commit is contained in:
parent
701a8b30f0
commit
b1ecc8353a
4 changed files with 30 additions and 0 deletions
|
@ -2356,10 +2356,19 @@ crl_cache_insert (ctrl_t ctrl, const char *url, ksba_reader_t reader)
|
|||
for (idx=0; !(err=ksba_crl_get_extension (crl, idx, &oid, &critical,
|
||||
NULL, NULL)); idx++)
|
||||
{
|
||||
strlist_t sl;
|
||||
|
||||
if (!critical
|
||||
|| !strcmp (oid, oidstr_authorityKeyIdentifier)
|
||||
|| !strcmp (oid, oidstr_crlNumber) )
|
||||
continue;
|
||||
|
||||
for (sl=opt.ignored_crl_extensions;
|
||||
sl && strcmp (sl->d, oid); sl = sl->next)
|
||||
;
|
||||
if (sl)
|
||||
continue; /* Is in ignored list. */
|
||||
|
||||
log_error (_("unknown critical CRL extension %s\n"), oid);
|
||||
log_info ("(CRL='%s')\n", url);
|
||||
if (!err2)
|
||||
|
|
|
@ -147,6 +147,7 @@ enum cmd_and_opt_values {
|
|||
oHTTPWrapperProgram,
|
||||
oIgnoreCert,
|
||||
oIgnoreCertExtension,
|
||||
oIgnoreCRLExtension,
|
||||
oUseTor,
|
||||
oNoUseTor,
|
||||
oKeyServer,
|
||||
|
@ -224,6 +225,7 @@ static gpgrt_opt_t opts[] = {
|
|||
ARGPARSE_s_n (oDisableCheckOwnSocket, "disable-check-own-socket", "@"),
|
||||
ARGPARSE_s_s (oIgnoreCert,"ignore-cert", "@"),
|
||||
ARGPARSE_s_s (oIgnoreCertExtension,"ignore-cert-extension", "@"),
|
||||
ARGPARSE_s_s (oIgnoreCRLExtension,"ignore-crl-extension", "@"),
|
||||
|
||||
|
||||
ARGPARSE_header ("Network", N_("Network related options")),
|
||||
|
@ -706,6 +708,7 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread)
|
|||
opt.ignored_certs = tmp;
|
||||
}
|
||||
FREE_STRLIST (opt.ignored_cert_extensions);
|
||||
FREE_STRLIST (opt.ignored_crl_extensions);
|
||||
http_register_tls_ca (NULL);
|
||||
FREE_STRLIST (hkp_cacert_filenames);
|
||||
FREE_STRLIST (opt.keyserver);
|
||||
|
@ -819,6 +822,10 @@ parse_rereadable_options (gpgrt_argparse_t *pargs, int reread)
|
|||
add_to_strlist (&opt.ignored_cert_extensions, pargs->r.ret_str);
|
||||
break;
|
||||
|
||||
case oIgnoreCRLExtension:
|
||||
add_to_strlist (&opt.ignored_crl_extensions, pargs->r.ret_str);
|
||||
break;
|
||||
|
||||
case oUseTor:
|
||||
tor_mode = TOR_MODE_FORCE;
|
||||
break;
|
||||
|
|
|
@ -132,6 +132,11 @@ struct
|
|||
OID per string. */
|
||||
strlist_t ignored_cert_extensions;
|
||||
|
||||
/* A list of CRL extension OIDs which are ignored so that one can
|
||||
* claim that a critical extension has been handled. One OID per
|
||||
* string. */
|
||||
strlist_t ignored_crl_extensions;
|
||||
|
||||
/* Allow expired certificates in the cache. */
|
||||
int debug_cache_expired_certs;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue