(hx509_general_name_unparse): function for unparsing GeneralName, only

supports GeneralName.URI


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20099 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-31 15:33:04 +00:00
parent 1f11f24ab2
commit 7d4ebe6f73

View File

@@ -675,3 +675,24 @@ hx509_name_is_null_p(const hx509_name name)
{
return name->der_name.u.rdnSequence.len == 0;
}
int
hx509_general_name_unparse(GeneralName *name, char **str)
{
struct rk_strpool *strpool = NULL;
*str = NULL;
switch (name->element) {
case choice_GeneralName_uniformResourceIdentifier:
strpool = rk_strpoolprintf(strpool, "URI: %s",
name->u.uniformResourceIdentifier);
break;
default:
return EINVAL;
}
*str = rk_strpoolcollect(strpool);
return 0;
}