From d6a69acba4f645cda0943631a384a5404412888f Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Fri, 12 Aug 2011 11:07:29 +0200 Subject: [PATCH] defined mapping of IKEv2 identity types to IF-MAP identity types --- src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c index 1d988b5..53ce445 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c @@ -232,17 +232,38 @@ static axiom_node_t* create_identity(private_tnc_ifmap_soap_t *this, 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: id_type = is_user ? "username" : "dns-name"; break; case ID_RFC822_ADDR: id_type = "email-address"; 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: id_type = "distinguished-name"; 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: 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); axiom_element_add_attribute(el, this->env, attr, node); -- 2.7.4