don't assert !CTX_FLAG_KRB_REAUTH when exporting partial contexts,
authorLuke Howard <lukeh@padl.com>
Mon, 28 Mar 2011 15:26:52 +0000 (02:26 +1100)
committerLuke Howard <lukeh@padl.com>
Mon, 28 Mar 2011 15:26:52 +0000 (02:26 +1100)
we may need this path for local attribute provider reentrancy

mech_eap/export_sec_context.c
mech_eap/import_sec_context.c

index 7d3842b..b242086 100644 (file)
@@ -146,9 +146,8 @@ gssEapExportSecContext(OM_uint32 *minor,
      * The partial context is only transmitted for unestablished acceptor
      * contexts.
      */
-    if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx)) {
-        assert((ctx->flags & CTX_FLAG_KRB_REAUTH) == 0);
-
+    if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx) &&
+        (ctx->flags & CTX_FLAG_KRB_REAUTH) == 0) {
         major = gssEapExportPartialContext(minor, ctx, &partialCtx);
         if (GSS_ERROR(major))
             goto cleanup;
index df52410..7f9cd2f 100644 (file)
@@ -296,9 +296,8 @@ gssEapImportContext(OM_uint32 *minor,
      * The partial context should only be expected for unestablished
      * acceptor contexts.
      */
-    if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx)) {
-        assert((ctx->flags & CTX_FLAG_KRB_REAUTH) == 0);
-
+    if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx) &&
+        (ctx->flags & CTX_FLAG_KRB_REAUTH) == 0) {
         major = gssEapImportPartialContext(minor, &p, &remain, ctx);
         if (GSS_ERROR(major))
             return major;