defined mapping of IKEv2 identity types to IF-MAP identity types
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 12 Aug 2011 09:07:29 +0000 (11:07 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 12 Aug 2011 09:07:29 +0000 (11:07 +0200)
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c

index 1d988b5..53ce445 100644 (file)
@@ -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);