if (GSS_ERROR(major))
goto cleanup;
- major = (sm->processToken)(minor,
- ctx,
- cred,
- &innerInputToken,
- input_chan_bindings,
- &innerOutputToken);
- if (GSS_ERROR(major))
- goto cleanup;
+ do {
+ major = (sm->processToken)(minor,
+ ctx,
+ cred,
+ &innerInputToken,
+ input_chan_bindings,
+ &innerOutputToken);
+ if (GSS_ERROR(major))
+ goto cleanup;
+ } while (major == GSS_S_CONTINUE_NEEDED && innerOutputToken.length == 0);
if (src_name != NULL && ctx->initiatorName != GSS_C_NO_NAME) {
major = gss_duplicate_name(&minor, ctx->initiatorName, src_name);
static struct wpabuf *
peerGetEapReqData(void *ctx)
{
- return NULL;
+ gss_ctx_id_t gssCtx = (gss_ctx_id_t)ctx;
+
+ return &gssCtx->initiatorCtx.reqData;
}
static void
goto cleanup;
}
+ wpabuf_set(&ctx->initiatorCtx.reqData,
+ inputToken->value, inputToken->length);
+
code = eap_peer_sm_step(ctx->initiatorCtx.eap);
if (ctx->flags & CTX_FLAG_EAP_RESP) {
}
cleanup:
+ wpabuf_set(&ctx->initiatorCtx.reqData, NULL, 0);
peerConfigFree(&tmpMinor, ctx);
return major;
innerInputToken.value = NULL;
}
- major = (sm->processToken)(minor,
- cred,
- ctx,
- target_name,
- mech_type,
- req_flags,
- time_req,
- input_chan_bindings,
- &innerInputToken,
- &innerOutputToken);
- if (GSS_ERROR(major))
- goto cleanup;
+ /*
+ * Advance through state machine whilst empty tokens are emitted and
+ * the status is not GSS_S_COMPLETE or an error status.
+ */
+ do {
+ major = (sm->processToken)(minor,
+ cred,
+ ctx,
+ target_name,
+ mech_type,
+ req_flags,
+ time_req,
+ input_chan_bindings,
+ &innerInputToken,
+ &innerOutputToken);
+ if (GSS_ERROR(major))
+ goto cleanup;
+ } while (major == GSS_S_CONTINUE_NEEDED && innerOutputToken.length == 0);
if (actual_mech_type != NULL) {
if (!gssEapInternalizeOid(ctx->mechanismUsed, actual_mech_type))