X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=set_name_attribute.c;h=fa9583635aa9b1dc498ef77c36aa7ab041f50ba0;hb=81378d116795fa8a7a56dc8e00c3b2666126682d;hp=a8a4a56856306e84ab03d0951cea24210ee0de55;hpb=70b02ff081eff826695916c70e166b128769f4ca;p=mech_eap.git diff --git a/set_name_attribute.c b/set_name_attribute.c index a8a4a56..fa95836 100644 --- a/set_name_attribute.c +++ b/set_name_attribute.c @@ -41,7 +41,6 @@ gss_set_name_attribute(OM_uint32 *minor, { OM_uint32 major; gss_buffer_desc prefix, suffix; - enum gss_eap_attribute_type type; if (name == GSS_C_NO_NAME) { *minor = EINVAL; @@ -50,27 +49,8 @@ gss_set_name_attribute(OM_uint32 *minor, GSSEAP_MUTEX_LOCK(&name->mutex); - major = decomposeAttributeName(minor, attr, &prefix, &suffix); - if (GSS_ERROR(major)) - goto cleanup; + major = gssEapSetNameAttribute(minor, name, complete, attr, value); - type = gssEapAttributePrefixToType(&prefix); - switch (type) { - case ATTR_TYPE_SAML_ATTR: - major = samlSetAttribute(minor, name->samlCtx, - complete, &suffix, value); - break; - case ATTR_TYPE_RADIUS_AVP: - major = radiusSetAttribute(minor, name->radiusCtx, - complete, &suffix, value); - break; - default: - *minor = ENOENT; - major = GSS_S_UNAVAILABLE; - break; - } - -cleanup: GSSEAP_MUTEX_UNLOCK(&name->mutex); return major;