diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-08-12 11:07:29 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-08-12 11:07:29 +0200 |
commit | d6a69acba4f645cda0943631a384a5404412888f (patch) | |
tree | 949fea70a2cb64f2f99fc556ff2e5056315c57c5 /src | |
parent | 9af9c6772b8735cd3b3f20e679c15ebcc12d28bf (diff) | |
download | strongswan-d6a69acba4f645cda0943631a384a5404412888f.tar.bz2 strongswan-d6a69acba4f645cda0943631a384a5404412888f.tar.xz |
defined mapping of IKEv2 identity types to IF-MAP identity types
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c index 1d988b57f..53ce445b7 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); |