Пример #1
0
SM_STATE(EAP, RECEIVED2)
{
	SM_ENTRY(EAP, RECEIVED2);

	/* parse rxResp, respId, respMethod */
	eap_sm_parseEapResp(sm, sm->eap_if.eapRespData);
}
Пример #2
0
SM_STATE(EAP, RECEIVED)
{
	SM_ENTRY(EAP, RECEIVED);
	/* parse rxResp, respId, respMethod */
	eap_sm_parseEapResp(sm, sm->eap_if.eapRespData);
	sm->num_rounds++;
}
Пример #3
0
SM_STATE(EAP, INITIALIZE)
{
	SM_ENTRY(EAP, INITIALIZE);

	sm->currentId = -1;
	eapol_set_bool(sm, EAPOL_eapSuccess, FALSE);
	eapol_set_bool(sm, EAPOL_eapFail, FALSE);
	eapol_set_bool(sm, EAPOL_eapTimeout, FALSE);
	free(sm->eapKeyData);
	sm->eapKeyData = NULL;
	sm->eapKeyDataLen = 0;
	/* eapKeyAvailable = FALSE */
	eapol_set_bool(sm, EAPOL_eapRestart, FALSE);

	/* This is not defined in draft-ietf-eap-statemachine-05.txt, but
	 * method state needs to be reseted here so that it does not remain in
	 * success state when re-authentication starts. */
	if (sm->m && sm->eap_method_priv) {
		sm->m->reset(sm, sm->eap_method_priv);
		sm->eap_method_priv = NULL;
	}
	sm->m = NULL;
	sm->user_eap_method_index = 0;

	if (sm->backend_auth) {
		sm->currentMethod = EAP_TYPE_NONE;
		/* parse rxResp, respId, respMethod */
		eap_sm_parseEapResp(sm, sm->eapRespData, sm->eapRespDataLen);
		if (sm->rxResp) {
			sm->currentId = sm->respId;
		}
	}
}
Пример #4
0
SM_STATE(EAP, INITIALIZE)
{
    SM_ENTRY(EAP, INITIALIZE);

    if (sm->eap_if.eapRestart && !sm->eap_server && sm->identity) {
        /*
         * Need to allow internal Identity method to be used instead
         * of passthrough at the beginning of reauthentication.
         */
        eap_server_clear_identity(sm);
    }

    sm->currentId = -1;
    sm->eap_if.eapSuccess = FALSE;
    sm->eap_if.eapFail = FALSE;
    sm->eap_if.eapTimeout = FALSE;
    os_free(sm->eap_if.eapKeyData);
    sm->eap_if.eapKeyData = NULL;
    sm->eap_if.eapKeyDataLen = 0;
    sm->eap_if.eapKeyAvailable = FALSE;
    sm->eap_if.eapRestart = FALSE;

    /*
     * This is not defined in RFC 4137, but method state needs to be
     * reseted here so that it does not remain in success state when
     * re-authentication starts.
     */
    if (sm->m && sm->eap_method_priv) {
        sm->m->reset(sm, sm->eap_method_priv);
        sm->eap_method_priv = NULL;
    }
    sm->m = NULL;
    sm->user_eap_method_index = 0;

    if (sm->backend_auth) {
        sm->currentMethod = EAP_TYPE_NONE;
        /* parse rxResp, respId, respMethod */
        eap_sm_parseEapResp(sm, sm->eap_if.eapRespData);
        if (sm->rxResp) {
            sm->currentId = sm->respId;
        }
    }
    sm->num_rounds = 0;
    sm->method_pending = METHOD_PENDING_NONE;

    wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_STARTED
            MACSTR, MAC2STR(sm->peer_addr));
}
Пример #5
0
SM_STATE(EAP, INITIALIZE)
{
	SM_ENTRY(EAP, INITIALIZE);

	sm->currentId = -1;
	sm->eap_if.eapSuccess = FALSE;
	sm->eap_if.eapFail = FALSE;
	sm->eap_if.eapTimeout = FALSE;
	os_free(sm->eap_if.eapKeyData);
	sm->eap_if.eapKeyData = NULL;
	sm->eap_if.eapKeyDataLen = 0;
	sm->eap_if.eapKeyAvailable = FALSE;
	sm->eap_if.eapRestart = FALSE;

	/*
	 * This is not defined in RFC 4137, but method state needs to be
	 * reseted here so that it does not remain in success state when
	 * re-authentication starts.
	 */
	if (sm->m && sm->eap_method_priv) {
		sm->m->reset(sm, sm->eap_method_priv);
		sm->eap_method_priv = NULL;
	}
	sm->m = NULL;
	sm->user_eap_method_index = 0;

	if (sm->backend_auth) {
		sm->currentMethod = EAP_TYPE_NONE;
		/* parse rxResp, respId, respMethod */
		eap_sm_parseEapResp(sm, sm->eap_if.eapRespData);
		if (sm->rxResp) {
			sm->currentId = sm->respId;
		}
	}
	sm->num_rounds = 0;
	sm->method_pending = METHOD_PENDING_NONE;

	os_free(sm->identity);			//ht add,090202
	sm->identity = NULL;			//ht add,090202
}
SM_STATE(EAP, INITIALIZE)
{
	SM_ENTRY(EAP, INITIALIZE);

	sm->currentId = -1;
	eapol_set_bool(sm, EAPOL_eapSuccess, FALSE);
	eapol_set_bool(sm, EAPOL_eapFail, FALSE);
	eapol_set_bool(sm, EAPOL_eapTimeout, FALSE);
	free(sm->eapKeyData);
	sm->eapKeyData = NULL;
	sm->eapKeyDataLen = 0;
	/* eapKeyAvailable = FALSE */
	eapol_set_bool(sm, EAPOL_eapRestart, FALSE);

	/*
	 * This is not defined in RFC 4137, but method state needs to be
	 * reseted here so that it does not remain in success state when
	 * re-authentication starts.
	 */
	if (sm->m && sm->eap_method_priv) {
		sm->m->reset(sm, sm->eap_method_priv);
		sm->eap_method_priv = NULL;
	}
	sm->m = NULL;
	sm->user_eap_method_index = 0;

	if (sm->backend_auth) {
		sm->currentMethod = EAP_TYPE_NONE;
		/* parse rxResp, respId, respMethod */
		eap_sm_parseEapResp(sm, sm->eapRespData, sm->eapRespDataLen);
		if (sm->rxResp) {
			sm->currentId = sm->respId;
                        wpa_printf(MSG_DEBUG, 
                                "SM_STATE EAP INITIALIZE new currentId %d", 
                                sm->currentId);
		}
	}
	sm->num_rounds = 0;
	sm->method_pending = METHOD_PENDING_NONE;
}