asn1: Add der_find_or_parse_heim_oid()
This commit is contained in:
@@ -208,6 +208,18 @@ der_find_heim_oid_by_name(const char *str, const heim_oid **oid)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
der_find_or_parse_heim_oid(const char *str, const char *sep, heim_oid *oid)
|
||||||
|
{
|
||||||
|
const heim_oid *found = NULL;
|
||||||
|
|
||||||
|
switch (der_find_heim_oid_by_name(str, &found)) {
|
||||||
|
case 0: return der_copy_oid(found, oid);
|
||||||
|
case -1: return der_parse_heim_oid (str, sep, oid);
|
||||||
|
default: return ENOMEM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
der_find_heim_oid_by_oid(const heim_oid *oid, const char **name)
|
der_find_heim_oid_by_oid(const heim_oid *oid, const char **name)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user