remove all RADIUS references from attr ctx manager
[mech_eap.orig] / import_sec_context.c
index 13f0ae2..28962fb 100644 (file)
@@ -169,7 +169,8 @@ importName(OM_uint32 *minor,
 
         tmp.value = p + 4;
 
-        major = gssEapImportName(minor, &tmp, GSS_C_NT_EXPORT_NAME, pName);
+        major = gssEapImportNameInternal(minor, &tmp, pName,
+                                         EXPORT_NAME_FLAG_COMPOSITE);
         if (GSS_ERROR(major))
             return major;
     }
@@ -249,9 +250,9 @@ gssEapImportContext(OM_uint32 *minor,
     p      += 24;
     remain -= 24;
 
-    *minor = sequenceInternalize(&ctx->seqState, &p, &remain);
-    if (*minor != 0)
-        return GSS_S_FAILURE;
+    major = sequenceInternalize(minor, &ctx->seqState, &p, &remain);
+    if (GSS_ERROR(major))
+        return major;
 
     /*
      * The partial context should only be expected for unestablished
@@ -263,7 +264,9 @@ gssEapImportContext(OM_uint32 *minor,
             return major;
     }
 
+#ifdef GSSEAP_DEBUG
     assert(remain == 0);
+#endif
 
     *minor = 0;
     major = GSS_S_COMPLETE;