(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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user