some work on fast reauth
[mech_eap.git] / inquire_context.c
index abe6c62..0553040 100644 (file)
@@ -53,13 +53,13 @@ gss_inquire_context(OM_uint32 *minor,
     }
 
     if (src_name != NULL) {
-        major = gss_duplicate_name(minor, ctx->initiatorName, src_name);
+        major = gssEapDuplicateName(minor, ctx->initiatorName, src_name);
         if (GSS_ERROR(major))
             goto cleanup;
     }
 
     if (targ_name != NULL) {
-        major = gss_duplicate_name(minor, ctx->acceptorName, targ_name);
+        major = gssEapDuplicateName(minor, ctx->acceptorName, targ_name);
         if (GSS_ERROR(major))
             goto cleanup;
     }
@@ -79,6 +79,14 @@ gss_inquire_context(OM_uint32 *minor,
         *lifetime_rec = lifetime;
     }
 
+    if (mech_type != NULL) {
+        if (!gssEapInternalizeOid(ctx->mechanismUsed, mech_type)) {
+            major = duplicateOid(minor, ctx->mechanismUsed, mech_type);
+            if (GSS_ERROR(major))
+                goto cleanup;
+        }
+    }
+
     if (ctx_flags != NULL) {
         *ctx_flags = ctx->gssFlags;
     }