Merge branch 'master' of ssh://moonshot.suchdamage.org:822/srv/git/moonshot
[mech_eap.git] / util_mech.c
index 717e09b..dd0c664 100644 (file)
  * SUCH DAMAGE.
  */
 
+/*
+ * General mechanism utility routines.
+ */
+
 #include "gssapiP_eap.h"
 
 /*
@@ -105,8 +109,10 @@ gssEapValidateMechs(OM_uint32 *minor,
     for (i = 0; i < mechs->count; i++) {
         gss_OID oid = &mechs->elements[i];
 
-        if (!gssEapIsConcreteMechanismOid(oid))
+        if (!gssEapIsConcreteMechanismOid(oid)) {
+            *minor = GSSEAP_WRONG_MECH;
             return GSS_S_BAD_MECH;
+        }
     }
 
     return GSS_S_COMPLETE;