defined mapping of IKEv2 identity types to IF-MAP identity types
This commit is contained in:
@@ -232,17 +232,38 @@ static axiom_node_t* create_identity(private_tnc_ifmap_soap_t *this,
|
|||||||
|
|
||||||
switch (id->get_type(id))
|
switch (id->get_type(id))
|
||||||
{
|
{
|
||||||
|
case ID_IPV4_ADDR:
|
||||||
|
id_type = "other";
|
||||||
|
attr = axiom_attribute_create(this->env, "other-type-definition",
|
||||||
|
"36906:ipv4-address", NULL);
|
||||||
|
axiom_element_add_attribute(el, this->env, attr, node);
|
||||||
|
break;
|
||||||
case ID_FQDN:
|
case ID_FQDN:
|
||||||
id_type = is_user ? "username" : "dns-name";
|
id_type = is_user ? "username" : "dns-name";
|
||||||
break;
|
break;
|
||||||
case ID_RFC822_ADDR:
|
case ID_RFC822_ADDR:
|
||||||
id_type = "email-address";
|
id_type = "email-address";
|
||||||
break;
|
break;
|
||||||
|
case ID_IPV6_ADDR:
|
||||||
|
id_type = "other";
|
||||||
|
attr = axiom_attribute_create(this->env, "other-type-definition",
|
||||||
|
"36906:ipv6-address", NULL);
|
||||||
|
axiom_element_add_attribute(el, this->env, attr, node);
|
||||||
|
break;
|
||||||
case ID_DER_ASN1_DN:
|
case ID_DER_ASN1_DN:
|
||||||
id_type = "distinguished-name";
|
id_type = "distinguished-name";
|
||||||
break;
|
break;
|
||||||
|
case ID_KEY_ID:
|
||||||
|
id_type = "other";
|
||||||
|
attr = axiom_attribute_create(this->env, "other-type-definition",
|
||||||
|
"36906:key-id", NULL);
|
||||||
|
axiom_element_add_attribute(el, this->env, attr, node);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
id_type = "other";
|
id_type = "other";
|
||||||
|
attr = axiom_attribute_create(this->env, "other-type-definition",
|
||||||
|
"36906:other", NULL);
|
||||||
|
axiom_element_add_attribute(el, this->env, attr, node);
|
||||||
}
|
}
|
||||||
attr = axiom_attribute_create(this->env, "type", id_type, NULL);
|
attr = axiom_attribute_create(this->env, "type", id_type, NULL);
|
||||||
axiom_element_add_attribute(el, this->env, attr, node);
|
axiom_element_add_attribute(el, this->env, attr, node);
|
||||||
|
|||||||
Reference in New Issue
Block a user