fix some nits when using default mechanism
[mech_eap.orig] / inquire_context.c
index abe6c62..1daf446 100644 (file)
@@ -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;
     }