(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:
@@ -243,4 +243,7 @@ int der_get_tag_num(const char *);
|
|||||||
int der_parse_hex_heim_integer(const char *, heim_integer *);
|
int der_parse_hex_heim_integer(const char *, heim_integer *);
|
||||||
int der_print_hex_heim_integer(const heim_integer *, char **);
|
int der_print_hex_heim_integer(const heim_integer *, char **);
|
||||||
|
|
||||||
|
int der_print_heim_oid (const heim_oid *data, char **);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __DER_H__ */
|
#endif /* __DER_H__ */
|
||||||
|
@@ -103,3 +103,25 @@ der_print_hex_heim_integer (const heim_integer *data, char **p)
|
|||||||
}
|
}
|
||||||
return 0;
|
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