Sending multiple EAP fragments (wpa_supplicant as a library)

Christian Scheid cxscheid
Wed May 19 10:19:24 PDT 2010


Hi,

I'm using wpa_supplicant-0.6.9 as a library and used the eap_example_peer.c
as a basis for the EAP-TLS authentication I'm trying to complete. My
question is if I have an EAP message with multiple fragments, how would I
request those from the wpa_supplicant?

In the code below I'm running eap_get_eapRespData in a loop while
eap_ctx.eapResp.
Is that the correct way of doing it?

Any assistance greatly appreciated!

Chris


// Run EAP Peer Step
    iRet = eap_peer_sm_step(eap_ctx.eap);
    if (iRet < 0){
        DPRINT_COMMONAPI(DEBUG_ERROR,"\n*******ERROR: Running EAP SM Step");
        return WIMAX_API_RET_FAILED;
    }

    while (eap_ctx.eapResp) {
        struct wpabuf *resp;
        eap_ctx.eapResp = FALSE;
        resp = eap_get_eapRespData(eap_ctx.eap);
        if (resp) {
            // Evaluate EAP State
            wpa_hexdump(MSG_DEBUG, "FROM SUPPLICANT MSG:
",wpabuf_head(resp),wpabuf_len(resp));

            /* Send EAP response to the Authenticator */
            if (!
SendMessageFromSupplicantToBs(wpabuf_head(resp),wpabuf_len(resp))) {
                wpabuf_free(resp);
                DPRINT_COMMONAPI(DEBUG_ERROR,"\n*******ERROR: In
SendMessageFromSupplicantToBs");
            }
            wpabuf_free(resp);
        }
    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20100519/a9be1d62/attachment.htm 



More information about the Hostap mailing list