(der_print_heim_oid): new function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17677 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -103,3 +103,25 @@ der_print_hex_heim_integer (const heim_integer *data, char **p)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
der_print_heim_oid (const heim_oid *oid, char **str)
|
||||
{
|
||||
struct rk_strpool *p = NULL;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < oid->length ; i++) {
|
||||
p = rk_strpoolprintf(p, "%d%s",
|
||||
oid->components[i],
|
||||
i < oid->length - 1 ? " " : "");
|
||||
if (p == NULL) {
|
||||
*str = NULL;
|
||||
return ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
*str = rk_strpoolcollect(p);
|
||||
if (*str == NULL)
|
||||
return ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user