return mechanism used, if any, in gss_inquire_name
authorLuke Howard <lukeh@padl.com>
Tue, 15 Mar 2011 09:12:25 +0000 (20:12 +1100)
committerLuke Howard <lukeh@padl.com>
Tue, 15 Mar 2011 09:12:25 +0000 (20:12 +1100)
mech_eap/inquire_name.c

index c62ff9e..e57d86e 100644 (file)
@@ -58,6 +58,19 @@ OM_uint32 gss_inquire_name(OM_uint32 *minor,
         return GSS_S_CALL_INACCESSIBLE_READ | GSS_S_BAD_NAME;
     }
 
+    if (name_is_MN != NULL)
+        *name_is_MN = 1;
+
+    if (MN_mech != NULL && name->mechanismUsed != GSS_C_NO_OID) {
+        assert(gssEapIsConcreteMechanismOid(name->mechanismUsed));
+
+        if (!gssEapInternalizeOid(name->mechanismUsed, MN_mech)) {
+            major = duplicateOid(minor, name->mechanismUsed, MN_mech);
+            if (GSS_ERROR(major))
+                return major;
+        }
+    }
+
     if (attrs == NULL)
         return GSS_S_COMPLETE;