X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot.git;a=blobdiff_plain;f=moonshot%2Fmech_eap%2Fexport_sec_context.c;h=1426d6289db71a328e7a1a8b37904a6aeee3ad17;hp=43f3f28b632d7c976e611efc01b42b586deee366;hb=56e9307122194ac49636ce2718523ea5889c6288;hpb=db09fc23e4dc013ecd797c51f2a8179cb0dfe670 diff --git a/moonshot/mech_eap/export_sec_context.c b/moonshot/mech_eap/export_sec_context.c index 43f3f28..1426d62 100644 --- a/moonshot/mech_eap/export_sec_context.c +++ b/moonshot/mech_eap/export_sec_context.c @@ -38,7 +38,7 @@ #include "gssapiP_eap.h" static OM_uint32 -gssEapExportPartialContext(OM_uint32 *minor, +exportPartialRadiusContext(OM_uint32 *minor, gss_ctx_id_t ctx, gss_buffer_t token) { @@ -143,7 +143,7 @@ gssEapExportSecContext(OM_uint32 *minor, */ if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx) && (ctx->flags & CTX_FLAG_KRB_REAUTH) == 0) { - major = gssEapExportPartialContext(minor, ctx, &partialCtx); + major = exportPartialRadiusContext(minor, ctx, &partialCtx); if (GSS_ERROR(major)) goto cleanup; } @@ -155,6 +155,9 @@ gssEapExportSecContext(OM_uint32 *minor, length += 4 + acceptorName.length; /* acceptorName.value */ length += 24 + sequenceSize(ctx->seqState); /* seqState */ + if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx)) + length += 4 + ctx->conversation.length; + if (partialCtx.value != NULL) length += 4 + partialCtx.length; /* partialCtx.value */ @@ -190,6 +193,9 @@ gssEapExportSecContext(OM_uint32 *minor, if (GSS_ERROR(major)) goto cleanup; + if (!CTX_IS_INITIATOR(ctx) && !CTX_IS_ESTABLISHED(ctx)) + p = store_buffer(&ctx->conversation, p, FALSE); + if (partialCtx.value != NULL) p = store_buffer(&partialCtx, p, FALSE);