Add dnsname and rfc822 SANs.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19585 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-12-30 15:03:10 +00:00
parent fd6fbe0d68
commit 2ad9f89060
3 changed files with 54 additions and 0 deletions

View File

@@ -219,6 +219,34 @@ out:
return ret;
}
int
hx509_ca_tbs_add_san_hostname(hx509_context context,
hx509_ca_tbs tbs,
const char *dnsname)
{
GeneralName gn;
memset(&gn, 0, sizeof(gn));
gn.element = choice_GeneralName_dNSName;
gn.u.dNSName = rk_UNCONST(dnsname);
return add_GeneralNames(&tbs->san, &gn);
}
int
hx509_ca_tbs_add_san_rfc822name(hx509_context context,
hx509_ca_tbs tbs,
const char *rfc822Name)
{
GeneralName gn;
memset(&gn, 0, sizeof(gn));
gn.element = choice_GeneralName_rfc822Name;
gn.u.rfc822Name = rk_UNCONST(rfc822Name);
return add_GeneralNames(&tbs->san, &gn);
}
int
hx509_ca_tbs_set_subject(hx509_context context,