EAP authenticator state machine procedures. More...
#include "authenticator/authenticator.h"
#include "authenticator/authenticator_procedures.h"
#include "eap/eap_debug.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL SUPPLICANT_TRACE_LEVEL |
Functions | |
uint_t | eapCalculateTimeout (AuthenticatorPort *port) |
Calculate retransmission timeout. More... | |
void | eapParseResp (AuthenticatorPort *port) |
Determine the code, identifier value, and type of the current response. More... | |
void | eapBuildSuccess (AuthenticatorPort *port) |
Create an EAP success packet. More... | |
void | eapBuildFailure (AuthenticatorPort *port) |
Create an EAP failure packet. More... | |
uint_t | eapNextId (uint_t id) |
Determine the next identifier value to use. More... | |
void | eapPolicyUpdate (AuthenticatorPort *port) |
Update all variables related to internal policy state. More... | |
EapMethodType | eapPolicyGetNextMethod (AuthenticatorPort *port) |
Determine the method that should be used at this point in the conversation. More... | |
EapDecision | eapPolicyGetDecision (AuthenticatorPort *port) |
Determine if the policy will allow SUCCESS, FAIL, or is yet to determine. More... | |
bool_t | eapCheckResp (AuthenticatorPort *port) |
Test for the validity of a message. More... | |
void | eapProcessResp (AuthenticatorPort *port) |
Parse and process a response. More... | |
void | eapInit (AuthenticatorPort *port) |
Method procedure to initialize state just before use. More... | |
void | eapReset (AuthenticatorPort *port) |
The method is ending in the middle of or before completion. More... | |
bool_t | eapIsDone (AuthenticatorPort *port) |
Check for method completion. More... | |
uint_t | eapGetTimeout (AuthenticatorPort *port) |
Determine an appropriate timeout hint for the method. More... | |
uint8_t * | eapAuthGetKey (AuthenticatorPort *port) |
Obtain key material for use by EAP or lower layers. More... | |
void | eapBuildReq (AuthenticatorPort *port) |
Produce the next request. More... | |
uint_t | eapGetId (const uint8_t *eapReqData, size_t eapReqDataLen) |
Determine the identifier value for the current EAP request. More... | |
Detailed Description
EAP authenticator state machine procedures.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2022-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneEAP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file eap_auth_procedures.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL SUPPLICANT_TRACE_LEVEL |
Definition at line 32 of file eap_auth_procedures.c.
Function Documentation
◆ eapAuthGetKey()
uint8_t* eapAuthGetKey | ( | AuthenticatorPort * | port | ) |
Obtain key material for use by EAP or lower layers.
- Parameters
-
[in] port Pointer to the port context
- Returns
- EAP key
Definition at line 380 of file eap_auth_procedures.c.
◆ eapBuildFailure()
void eapBuildFailure | ( | AuthenticatorPort * | port | ) |
Create an EAP failure packet.
- Parameters
-
[in] port Pointer to the port context
Definition at line 162 of file eap_auth_procedures.c.
◆ eapBuildReq()
void eapBuildReq | ( | AuthenticatorPort * | port | ) |
Produce the next request.
- Parameters
-
[in] port Pointer to the port context
Definition at line 395 of file eap_auth_procedures.c.
◆ eapBuildSuccess()
void eapBuildSuccess | ( | AuthenticatorPort * | port | ) |
Create an EAP success packet.
- Parameters
-
[in] port Pointer to the port context
Definition at line 126 of file eap_auth_procedures.c.
◆ eapCalculateTimeout()
uint_t eapCalculateTimeout | ( | AuthenticatorPort * | port | ) |
Calculate retransmission timeout.
- Parameters
-
[in] port Pointer to the port context
- Returns
- Timeout value
Definition at line 50 of file eap_auth_procedures.c.
◆ eapCheckResp()
bool_t eapCheckResp | ( | AuthenticatorPort * | port | ) |
Test for the validity of a message.
- Parameters
-
[in] port Pointer to the port context
- Returns
- TRUE if the message is invalid and must be ignored, else FALSE
Definition at line 284 of file eap_auth_procedures.c.
◆ eapGetId()
uint_t eapGetId | ( | const uint8_t * | eapReqData, |
size_t | eapReqDataLen | ||
) |
Determine the identifier value for the current EAP request.
- Parameters
-
[in] eapReqData Pointer to the EAP request [in] eapReqDataLen Length of the EAP request, in bytes
- Returns
- Identifier value
Definition at line 449 of file eap_auth_procedures.c.
◆ eapGetTimeout()
uint_t eapGetTimeout | ( | AuthenticatorPort * | port | ) |
Determine an appropriate timeout hint for the method.
- Parameters
-
[in] port Pointer to the port context
- Returns
- Timeout value
Definition at line 364 of file eap_auth_procedures.c.
◆ eapInit()
void eapInit | ( | AuthenticatorPort * | port | ) |
Method procedure to initialize state just before use.
- Parameters
-
[in] port Pointer to the port context
Definition at line 323 of file eap_auth_procedures.c.
◆ eapIsDone()
bool_t eapIsDone | ( | AuthenticatorPort * | port | ) |
Check for method completion.
- Parameters
-
[in] port Pointer to the port context
- Returns
- Boolean
Definition at line 348 of file eap_auth_procedures.c.
◆ eapNextId()
Determine the next identifier value to use.
- Parameters
-
[in] id Current identifier value
- Returns
- Next identifier value to use
Definition at line 199 of file eap_auth_procedures.c.
◆ eapParseResp()
void eapParseResp | ( | AuthenticatorPort * | port | ) |
Determine the code, identifier value, and type of the current response.
- Parameters
-
[in] port Pointer to the port context
Definition at line 67 of file eap_auth_procedures.c.
◆ eapPolicyGetDecision()
EapDecision eapPolicyGetDecision | ( | AuthenticatorPort * | port | ) |
Determine if the policy will allow SUCCESS, FAIL, or is yet to determine.
- Parameters
-
[in] port Pointer to the port context
- Returns
- Decision enumeration
Definition at line 253 of file eap_auth_procedures.c.
◆ eapPolicyGetNextMethod()
EapMethodType eapPolicyGetNextMethod | ( | AuthenticatorPort * | port | ) |
Determine the method that should be used at this point in the conversation.
- Parameters
-
[in] port Pointer to the port context
- Returns
- Next method to use
Definition at line 237 of file eap_auth_procedures.c.
◆ eapPolicyUpdate()
void eapPolicyUpdate | ( | AuthenticatorPort * | port | ) |
Update all variables related to internal policy state.
- Parameters
-
[in] port Pointer to the port context
Definition at line 224 of file eap_auth_procedures.c.
◆ eapProcessResp()
void eapProcessResp | ( | AuthenticatorPort * | port | ) |
Parse and process a response.
- Parameters
-
[in] port Pointer to the port context
Definition at line 311 of file eap_auth_procedures.c.
◆ eapReset()
void eapReset | ( | AuthenticatorPort * | port | ) |
The method is ending in the middle of or before completion.
- Parameters
-
[in] port Pointer to the port context
Definition at line 335 of file eap_auth_procedures.c.