X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.orig;a=blobdiff_plain;f=get_name_attribute.c;h=c5e5d244fa10fa454b66730ccd71b59616c2626d;hp=3b22dc5d46c4ea4519be3c3d976a8734b808e51b;hb=81378d116795fa8a7a56dc8e00c3b2666126682d;hpb=899e578a598e3be50fdf3e7cc1ef033e60d4067a diff --git a/get_name_attribute.c b/get_name_attribute.c index 3b22dc5..c5e5d24 100644 --- a/get_name_attribute.c +++ b/get_name_attribute.c @@ -42,9 +42,8 @@ gss_get_name_attribute(OM_uint32 *minor, gss_buffer_t display_value, int *more) { - OM_uint32 major, tmpMinor; + OM_uint32 major; gss_buffer_desc prefix, suffix; - enum gss_eap_attribute_type type; if (name == GSS_C_NO_NAME) { *minor = EINVAL; @@ -61,33 +60,10 @@ gss_get_name_attribute(OM_uint32 *minor, GSSEAP_MUTEX_LOCK(&name->mutex); - major = decomposeAttributeName(minor, attr, &prefix, &suffix); - if (GSS_ERROR(major)) - goto cleanup; - - type = gssEapAttributePrefixToType(&prefix); - switch (type) { - case ATTR_TYPE_NONE: - case ATTR_TYPE_SAML_ATTR: - major = samlGetAttribute(minor, type, name, - (type == ATTR_TYPE_NONE) ? attr : &suffix, - authenticated, complete, - value, display_value, more); - break; - case ATTR_TYPE_SAML_AAA_ASSERTION: - major = samlGetAssertion(minor, name, value); - break; - case ATTR_TYPE_RADIUS_AVP: - major = radiusGetAttribute(minor, name, &suffix, + major = gssEapGetNameAttribute(minor, name, attr, authenticated, complete, value, display_value, more); - break; - default: - major = GSS_S_UNAVAILABLE; - break; - } -cleanup: GSSEAP_MUTEX_UNLOCK(&name->mutex); return major;