mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* gpgsm.c: New option --force-crl-refresh.
* call-dirmngr.c (gpgsm_dirmngr_isvalid): Pass option to dirmngr.
This commit is contained in:
parent
1194f42d5a
commit
c61c77b1b2
@ -1,3 +1,8 @@
|
|||||||
|
2004-04-07 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* gpgsm.c: New option --force-crl-refresh.
|
||||||
|
* call-dirmngr.c (gpgsm_dirmngr_isvalid): Pass option to dirmngr.
|
||||||
|
|
||||||
2004-04-05 Werner Koch <wk@gnupg.org>
|
2004-04-05 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* server.c (get_status_string): Add STATUS_NEWSIG.
|
* server.c (get_status_string): Add STATUS_NEWSIG.
|
||||||
|
@ -149,6 +149,8 @@ start_dirmngr (void)
|
|||||||
if (dirmngr_ctx)
|
if (dirmngr_ctx)
|
||||||
return 0; /* fixme: We need a context for each thread or serialize
|
return 0; /* fixme: We need a context for each thread or serialize
|
||||||
the access to the dirmngr */
|
the access to the dirmngr */
|
||||||
|
/* Note: if you change this to multiple connections, you also need
|
||||||
|
to take care of the implicit option sending caching. */
|
||||||
|
|
||||||
infostr = force_pipe_server? NULL : getenv ("DIRMNGR_INFO");
|
infostr = force_pipe_server? NULL : getenv ("DIRMNGR_INFO");
|
||||||
if (!infostr || !*infostr)
|
if (!infostr || !*infostr)
|
||||||
@ -359,12 +361,14 @@ int
|
|||||||
gpgsm_dirmngr_isvalid (ctrl_t ctrl,
|
gpgsm_dirmngr_isvalid (ctrl_t ctrl,
|
||||||
ksba_cert_t cert, ksba_cert_t issuer_cert, int use_ocsp)
|
ksba_cert_t cert, ksba_cert_t issuer_cert, int use_ocsp)
|
||||||
{
|
{
|
||||||
|
static int did_options;
|
||||||
int rc;
|
int rc;
|
||||||
char *certid;
|
char *certid;
|
||||||
char line[ASSUAN_LINELENGTH];
|
char line[ASSUAN_LINELENGTH];
|
||||||
struct inq_certificate_parm_s parm;
|
struct inq_certificate_parm_s parm;
|
||||||
struct isvalid_status_parm_s stparm;
|
struct isvalid_status_parm_s stparm;
|
||||||
|
|
||||||
|
|
||||||
rc = start_dirmngr ();
|
rc = start_dirmngr ();
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
@ -402,6 +406,15 @@ gpgsm_dirmngr_isvalid (ctrl_t ctrl,
|
|||||||
option to dirmngr, so that no fallback CRL check is done after an
|
option to dirmngr, so that no fallback CRL check is done after an
|
||||||
ocsp check. */
|
ocsp check. */
|
||||||
|
|
||||||
|
/* It is sufficient to send the options only once because we have
|
||||||
|
one connection per process only. */
|
||||||
|
if (!did_options)
|
||||||
|
{
|
||||||
|
if (opt.force_crl_refresh)
|
||||||
|
assuan_transact (dirmngr_ctx, "OPTION force-crl-refresh=1",
|
||||||
|
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
did_options = 1;
|
||||||
|
}
|
||||||
snprintf (line, DIM(line)-1, "ISVALID %s", certid);
|
snprintf (line, DIM(line)-1, "ISVALID %s", certid);
|
||||||
line[DIM(line)-1] = 0;
|
line[DIM(line)-1] = 0;
|
||||||
xfree (certid);
|
xfree (certid);
|
||||||
|
@ -153,7 +153,7 @@ gpgsm_get_keygrip (ksba_cert_t cert, char *array)
|
|||||||
return NULL; /* oops */
|
return NULL; /* oops */
|
||||||
|
|
||||||
if (DBG_X509)
|
if (DBG_X509)
|
||||||
log_debug ("get_keygrip for public key: %s\n", p);
|
log_debug ("get_keygrip for public key\n");
|
||||||
n = gcry_sexp_canon_len (p, 0, NULL, NULL);
|
n = gcry_sexp_canon_len (p, 0, NULL, NULL);
|
||||||
if (!n)
|
if (!n)
|
||||||
{
|
{
|
||||||
|
@ -115,10 +115,11 @@ enum cmd_and_opt_values {
|
|||||||
|
|
||||||
oDisableCRLChecks,
|
oDisableCRLChecks,
|
||||||
oEnableCRLChecks,
|
oEnableCRLChecks,
|
||||||
|
oForceCRLRefresh,
|
||||||
|
|
||||||
oDisableOCSP,
|
oDisableOCSP,
|
||||||
oEnableOCSP,
|
oEnableOCSP,
|
||||||
|
|
||||||
|
|
||||||
oIncludeCerts,
|
oIncludeCerts,
|
||||||
oPolicyFile,
|
oPolicyFile,
|
||||||
oDisablePolicyChecks,
|
oDisablePolicyChecks,
|
||||||
@ -262,6 +263,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||||||
|
|
||||||
{ oDisableCRLChecks, "disable-crl-checks", 0, N_("never consult a CRL")},
|
{ oDisableCRLChecks, "disable-crl-checks", 0, N_("never consult a CRL")},
|
||||||
{ oEnableCRLChecks, "enable-crl-checks", 0, "@"},
|
{ oEnableCRLChecks, "enable-crl-checks", 0, "@"},
|
||||||
|
{ oForceCRLRefresh, "force-crl-refresh", 0, "@"},
|
||||||
|
|
||||||
{ oDisableOCSP, "disable-ocsp", 0, "@" },
|
{ oDisableOCSP, "disable-ocsp", 0, "@" },
|
||||||
{ oEnableOCSP, "enable-ocsp", 0, N_("check validity using OCSP")},
|
{ oEnableOCSP, "enable-ocsp", 0, N_("check validity using OCSP")},
|
||||||
@ -931,6 +933,9 @@ main ( int argc, char **argv)
|
|||||||
case oEnableCRLChecks:
|
case oEnableCRLChecks:
|
||||||
opt.no_crl_check = 0;
|
opt.no_crl_check = 0;
|
||||||
break;
|
break;
|
||||||
|
case oForceCRLRefresh:
|
||||||
|
opt.force_crl_refresh = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case oDisableOCSP:
|
case oDisableOCSP:
|
||||||
ctrl.use_ocsp = opt.enable_ocsp = 0;
|
ctrl.use_ocsp = opt.enable_ocsp = 0;
|
||||||
|
@ -89,6 +89,7 @@ struct {
|
|||||||
int ignore_time_conflict; /* Ignore certain time conflicts */
|
int ignore_time_conflict; /* Ignore certain time conflicts */
|
||||||
|
|
||||||
int no_crl_check; /* Don't do a CRL check */
|
int no_crl_check; /* Don't do a CRL check */
|
||||||
|
int force_crl_refresh; /* Force refreshing the CRL. */
|
||||||
int enable_ocsp; /* Default to use OCSP checks. */
|
int enable_ocsp; /* Default to use OCSP checks. */
|
||||||
|
|
||||||
char *policy_file; /* full pathname of policy file */
|
char *policy_file; /* full pathname of policy file */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user