verify parameter enumeration functions
(cherry picked from commit 9b3d75706ef0114362f04665a3c745bfef59d023) Conflicts: crypto/x509/x509_vpm.c
This commit is contained in:
parent
adc6bd73e3
commit
3a0c71541b
@ -567,8 +567,11 @@ int X509_VERIFY_PARAM_set1_ip(X509_VERIFY_PARAM *param,
|
|||||||
int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc);
|
int X509_VERIFY_PARAM_set1_ip_asc(X509_VERIFY_PARAM *param, const char *ipasc);
|
||||||
|
|
||||||
int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
|
int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);
|
||||||
|
const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param);
|
||||||
|
|
||||||
int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
|
int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);
|
||||||
|
int X509_VERIFY_PARAM_get_count(void);
|
||||||
|
const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id);
|
||||||
const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
|
const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);
|
||||||
void X509_VERIFY_PARAM_table_cleanup(void);
|
void X509_VERIFY_PARAM_table_cleanup(void);
|
||||||
|
|
||||||
|
@ -432,6 +432,11 @@ int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param)
|
|||||||
return param->depth;
|
return param->depth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param)
|
||||||
|
{
|
||||||
|
return param->name;
|
||||||
|
}
|
||||||
|
|
||||||
static X509_VERIFY_PARAM_ID _empty_id = {NULL, 0, NULL, 0, NULL, 0};
|
static X509_VERIFY_PARAM_ID _empty_id = {NULL, 0, NULL, 0, NULL, 0};
|
||||||
|
|
||||||
#define vpm_empty_id (X509_VERIFY_PARAM_ID *)&_empty_id
|
#define vpm_empty_id (X509_VERIFY_PARAM_ID *)&_empty_id
|
||||||
@ -543,6 +548,22 @@ int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int X509_VERIFY_PARAM_get_count(void)
|
||||||
|
{
|
||||||
|
int num = sizeof(default_table)/sizeof(X509_VERIFY_PARAM);
|
||||||
|
if (param_table)
|
||||||
|
num += sk_X509_VERIFY_PARAM_num(param_table);
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
const X509_VERIFY_PARAM *X509_VERIFY_PARAM_get0(int id)
|
||||||
|
{
|
||||||
|
int num = sizeof(default_table)/sizeof(X509_VERIFY_PARAM);
|
||||||
|
if (id < num)
|
||||||
|
return default_table + id;
|
||||||
|
return sk_X509_VERIFY_PARAM_value(param_table, id - num);
|
||||||
|
}
|
||||||
|
|
||||||
const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name)
|
const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name)
|
||||||
{
|
{
|
||||||
int idx;
|
int idx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user