Update from HEAD.
This commit is contained in:
parent
dbb834ffeb
commit
fa07f00aaf
20
apps/apps.c
20
apps/apps.c
@ -2192,7 +2192,7 @@ int args_verify(char ***pargs, int *pargc,
|
|||||||
ASN1_OBJECT *otmp = NULL;
|
ASN1_OBJECT *otmp = NULL;
|
||||||
unsigned long flags = 0;
|
unsigned long flags = 0;
|
||||||
int i;
|
int i;
|
||||||
int purpose = 0;
|
int purpose = 0, depth = -1;
|
||||||
char **oldargs = *pargs;
|
char **oldargs = *pargs;
|
||||||
char *arg = **pargs, *argn = (*pargs)[1];
|
char *arg = **pargs, *argn = (*pargs)[1];
|
||||||
if (!strcmp(arg, "-policy"))
|
if (!strcmp(arg, "-policy"))
|
||||||
@ -2232,6 +2232,21 @@ int args_verify(char ***pargs, int *pargc,
|
|||||||
}
|
}
|
||||||
(*pargs)++;
|
(*pargs)++;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(arg,"-verify_depth") == 0)
|
||||||
|
{
|
||||||
|
if (!argn)
|
||||||
|
*badarg = 1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
depth = atoi(argn);
|
||||||
|
if(depth < 0)
|
||||||
|
{
|
||||||
|
BIO_printf(err, "invalid depth\n");
|
||||||
|
*badarg = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(*pargs)++;
|
||||||
|
}
|
||||||
else if (!strcmp(arg, "-ignore_critical"))
|
else if (!strcmp(arg, "-ignore_critical"))
|
||||||
flags |= X509_V_FLAG_IGNORE_CRITICAL;
|
flags |= X509_V_FLAG_IGNORE_CRITICAL;
|
||||||
else if (!strcmp(arg, "-issuer_checks"))
|
else if (!strcmp(arg, "-issuer_checks"))
|
||||||
@ -2283,6 +2298,9 @@ int args_verify(char ***pargs, int *pargc,
|
|||||||
if (purpose)
|
if (purpose)
|
||||||
X509_VERIFY_PARAM_set_purpose(*pm, purpose);
|
X509_VERIFY_PARAM_set_purpose(*pm, purpose);
|
||||||
|
|
||||||
|
if (depth >= 0)
|
||||||
|
X509_VERIFY_PARAM_set_depth(*pm, depth);
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
(*pargs)++;
|
(*pargs)++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user