X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=set_name_attribute.c;h=6dd9434c7e2dfff3ad5c6b4e51c8a051beddf1f2;hb=refs%2Fheads%2Fjson-name;hp=98075574655097264e6803c4def3af4775e08840;hpb=1f273eda615c04331df6849cfbf3cfad069ea8b0;p=mech_eap.orig diff --git a/set_name_attribute.c b/set_name_attribute.c index 9807557..6dd9434 100644 --- a/set_name_attribute.c +++ b/set_name_attribute.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, JANET(UK) + * Copyright (c) 2011, JANET(UK) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,6 +30,10 @@ * SUCH DAMAGE. */ +/* + * Set an attribute on a name. + */ + #include "gssapiP_eap.h" OM_uint32 @@ -40,8 +44,6 @@ gss_set_name_attribute(OM_uint32 *minor, gss_buffer_t value) { OM_uint32 major; - gss_buffer_desc prefix, suffix; - enum gss_eap_attribute_type type; if (name == GSS_C_NO_NAME) { *minor = EINVAL; @@ -50,18 +52,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; - - type = gssEapAttributePrefixToType(&prefix); - if (type == ATTR_TYPE_NONE) { - major = samlSetAttribute(minor, name, complete, attr, value); - } else { - major = GSS_S_UNAVAILABLE; - } + major = gssEapSetNameAttribute(minor, name, complete, attr, value); -cleanup: GSSEAP_MUTEX_UNLOCK(&name->mutex); return major;