[wpa_supplicant] Cumulative patch from commit c54a5e96b
Bug: 154862045
Test: Confirm random dialog token usage from logs
Test: Verify Passpoint ANQP functionality and Passpoint association
Test: act.py -c ../WifiDppConfig.json -tc WifiDppTest
Test: Connect to Passpoint, Open, WPA2, WPA3 networks and run traffic
c54a5e96b Randomize GAS dialog token
a803ba4f9 Use more specific reason codes for 4-way handshake timeouts
ff0b87304 nl80211: Process unprotected Beacon frame RX events
a39e9af90 nl80211: DPP listen mode callback
e81e2091b Remove now unused Boolean/TRUE/FALSE definitions
3d58e8286 FILS: Convert Boolean to C99 bool
86ea761e9 mesh: Convert Boolean to C99 bool
71140cd5b RADIUS: Convert Boolean to C99 bool
2c55e67aa airtime_policy: Convert Boolean to C99 bool
f75a0339d state_machine: Convert Boolean to C99 bool
0365458eb HE: Replace Boolean with C99 bool
5e5eb5a31 MACsec: Convert Boolean to C99 bool
d15e109e2 EAP peer: Convert Boolean to C99 bool
c9d70dd32 RSN supp: Convert Boolean to C99 bool
da8478a1a EAPOL supp: Convert Boolean to C99 bool
37e3501bf FST: Convert Boolean to C99 bool
3dc69721e EAPOL auth: Convert Boolean to C99 bool
56024a233 WPA auth: Convert Boolean to C99 bool
4d9c313f2 WPA: Fix wpa_parse_kde_ies() handling with vendor specific elements
1025a9052 Sync with mac80211-next.git include/uapi/linux/nl80211.h
Change-Id: I4fc553d84810ba82fdc626767c2e8a5640e4ca51
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index c78b214..74c2ad3 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -37,8 +37,8 @@
#define EAP_CLIENT_TIMEOUT_DEFAULT 60
-static Boolean eap_sm_allowMethod(struct eap_sm *sm, int vendor,
- enum eap_type method);
+static bool eap_sm_allowMethod(struct eap_sm *sm, int vendor,
+ enum eap_type method);
static struct wpabuf * eap_sm_buildNak(struct eap_sm *sm, int id);
static void eap_sm_processIdentity(struct eap_sm *sm,
const struct wpabuf *req);
@@ -54,14 +54,14 @@
-static Boolean eapol_get_bool(struct eap_sm *sm, enum eapol_bool_var var)
+static bool eapol_get_bool(struct eap_sm *sm, enum eapol_bool_var var)
{
return sm->eapol_cb->get_bool(sm->eapol_ctx, var);
}
static void eapol_set_bool(struct eap_sm *sm, enum eapol_bool_var var,
- Boolean value)
+ bool value)
{
sm->eapol_cb->set_bool(sm->eapol_ctx, var, value);
}
@@ -210,8 +210,8 @@
/*
* This state initializes state machine variables when the machine is
- * activated (portEnabled = TRUE). This is also used when re-starting
- * authentication (eapRestart == TRUE).
+ * activated (portEnabled = true). This is also used when re-starting
+ * authentication (eapRestart == true).
*/
SM_STATE(EAP, INITIALIZE)
{
@@ -229,17 +229,17 @@
}
sm->selectedMethod = EAP_TYPE_NONE;
sm->methodState = METHOD_NONE;
- sm->allowNotifications = TRUE;
+ sm->allowNotifications = true;
sm->decision = DECISION_FAIL;
sm->ClientTimeout = EAP_CLIENT_TIMEOUT_DEFAULT;
eapol_set_int(sm, EAPOL_idleWhile, sm->ClientTimeout);
- eapol_set_bool(sm, EAPOL_eapSuccess, FALSE);
- eapol_set_bool(sm, EAPOL_eapFail, FALSE);
+ eapol_set_bool(sm, EAPOL_eapSuccess, false);
+ eapol_set_bool(sm, EAPOL_eapFail, false);
eap_sm_free_key(sm);
os_free(sm->eapSessionId);
sm->eapSessionId = NULL;
- sm->eapKeyAvailable = FALSE;
- eapol_set_bool(sm, EAPOL_eapRestart, FALSE);
+ sm->eapKeyAvailable = false;
+ eapol_set_bool(sm, EAPOL_eapRestart, false);
sm->lastId = -1; /* new session - make sure this does not match with
* the first EAP-Packet */
/*
@@ -247,16 +247,16 @@
* seemed to be able to trigger cases where both were set and if EAPOL
* state machine uses eapNoResp first, it may end up not sending a real
* reply correctly. This occurred when the workaround in FAIL state set
- * eapNoResp = TRUE.. Maybe that workaround needs to be fixed to do
+ * eapNoResp = true.. Maybe that workaround needs to be fixed to do
* something else(?)
*/
- eapol_set_bool(sm, EAPOL_eapResp, FALSE);
- eapol_set_bool(sm, EAPOL_eapNoResp, FALSE);
+ eapol_set_bool(sm, EAPOL_eapResp, false);
+ eapol_set_bool(sm, EAPOL_eapNoResp, false);
/*
* RFC 4137 does not reset ignore here, but since it is possible for
- * some method code paths to end up not setting ignore=FALSE, clear the
+ * some method code paths to end up not setting ignore=false, clear the
* value here to avoid issues if a previous authentication attempt
- * failed with ignore=TRUE being left behind in the last
+ * failed with ignore=true being left behind in the last
* m.check(eapReqData) operation.
*/
sm->ignore = 0;
@@ -264,7 +264,7 @@
sm->num_rounds_short = 0;
sm->prev_failure = 0;
sm->expected_failure = 0;
- sm->reauthInit = FALSE;
+ sm->reauthInit = false;
sm->erp_seq = (u32) -1;
sm->use_machine_cred = 0;
}
@@ -272,7 +272,7 @@
/*
* This state is reached whenever service from the lower layer is interrupted
- * or unavailable (portEnabled == FALSE). Immediate transition to INITIALIZE
+ * or unavailable (portEnabled == false). Immediate transition to INITIALIZE
* occurs when the port becomes enabled.
*/
SM_STATE(EAP, DISABLED)
@@ -301,7 +301,7 @@
/*
- * This state is entered when an EAP packet is received (eapReq == TRUE) to
+ * This state is entered when an EAP packet is received (eapReq == true) to
* parse the packet header.
*/
SM_STATE(EAP, RECEIVED)
@@ -866,7 +866,7 @@
wpa_printf(MSG_DEBUG, "EAP: Sending EAP-Initiate/Re-auth");
wpabuf_free(sm->eapRespData);
sm->eapRespData = msg;
- sm->reauthInit = TRUE;
+ sm->reauthInit = true;
return 0;
}
#endif /* CONFIG_ERP */
@@ -964,14 +964,14 @@
os_memcpy(sm->last_sha1, sm->req_sha1, 20);
sm->lastId = sm->reqId;
sm->lastRespData = wpabuf_dup(sm->eapRespData);
- eapol_set_bool(sm, EAPOL_eapResp, TRUE);
+ eapol_set_bool(sm, EAPOL_eapResp, true);
} else {
wpa_printf(MSG_DEBUG, "EAP: No eapRespData available");
sm->lastRespData = NULL;
}
- eapol_set_bool(sm, EAPOL_eapReq, FALSE);
+ eapol_set_bool(sm, EAPOL_eapReq, false);
eapol_set_int(sm, EAPOL_idleWhile, sm->ClientTimeout);
- sm->reauthInit = FALSE;
+ sm->reauthInit = false;
}
@@ -982,8 +982,8 @@
SM_STATE(EAP, DISCARD)
{
SM_ENTRY(EAP, DISCARD);
- eapol_set_bool(sm, EAPOL_eapReq, FALSE);
- eapol_set_bool(sm, EAPOL_eapNoResp, TRUE);
+ eapol_set_bool(sm, EAPOL_eapReq, false);
+ eapol_set_bool(sm, EAPOL_eapNoResp, true);
}
@@ -1048,15 +1048,15 @@
SM_ENTRY(EAP, SUCCESS);
if (sm->eapKeyData != NULL)
- sm->eapKeyAvailable = TRUE;
- eapol_set_bool(sm, EAPOL_eapSuccess, TRUE);
+ sm->eapKeyAvailable = true;
+ eapol_set_bool(sm, EAPOL_eapSuccess, true);
/*
* RFC 4137 does not clear eapReq here, but this seems to be required
* to avoid processing the same request twice when state machine is
* initialized.
*/
- eapol_set_bool(sm, EAPOL_eapReq, FALSE);
+ eapol_set_bool(sm, EAPOL_eapReq, false);
/*
* RFC 4137 does not set eapNoResp here, but this seems to be required
@@ -1064,7 +1064,7 @@
* addition, either eapResp or eapNoResp is required to be set after
* processing the received EAP frame.
*/
- eapol_set_bool(sm, EAPOL_eapNoResp, TRUE);
+ eapol_set_bool(sm, EAPOL_eapNoResp, true);
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS
"EAP authentication completed successfully");
@@ -1083,21 +1083,21 @@
SM_STATE(EAP, FAILURE)
{
SM_ENTRY(EAP, FAILURE);
- eapol_set_bool(sm, EAPOL_eapFail, TRUE);
+ eapol_set_bool(sm, EAPOL_eapFail, true);
/*
* RFC 4137 does not clear eapReq here, but this seems to be required
* to avoid processing the same request twice when state machine is
* initialized.
*/
- eapol_set_bool(sm, EAPOL_eapReq, FALSE);
+ eapol_set_bool(sm, EAPOL_eapReq, false);
/*
* RFC 4137 does not set eapNoResp here. However, either eapResp or
* eapNoResp is required to be set after processing the received EAP
* frame.
*/
- eapol_set_bool(sm, EAPOL_eapNoResp, TRUE);
+ eapol_set_bool(sm, EAPOL_eapNoResp, true);
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_FAILURE
"EAP authentication failed");
@@ -1367,19 +1367,19 @@
}
-static Boolean eap_sm_allowMethod(struct eap_sm *sm, int vendor,
- enum eap_type method)
+static bool eap_sm_allowMethod(struct eap_sm *sm, int vendor,
+ enum eap_type method)
{
if (!eap_allowed_method(sm, vendor, method)) {
wpa_printf(MSG_DEBUG, "EAP: configuration does not allow: "
"vendor %u method %u", vendor, method);
- return FALSE;
+ return false;
}
if (eap_peer_get_eap_method(vendor, method))
- return TRUE;
+ return true;
wpa_printf(MSG_DEBUG, "EAP: not included in build: "
"vendor %u method %u", vendor, method);
- return FALSE;
+ return false;
}
@@ -1802,7 +1802,7 @@
#endif /* CONFIG_ERP */
wpa_printf(MSG_DEBUG,
"EAP: EAP-Initiate/Re-auth-Start - No suitable ERP keys available - try to start full EAP authentication");
- eapol_set_bool(sm, EAPOL_eapTriggerStart, TRUE);
+ eapol_set_bool(sm, EAPOL_eapTriggerStart, true);
}
@@ -1926,9 +1926,9 @@
if (flags & 0x80 || !auth_tag_ok) {
wpa_printf(MSG_DEBUG,
"EAP: EAP-Finish/Re-auth indicated failure");
- eapol_set_bool(sm, EAPOL_eapFail, TRUE);
- eapol_set_bool(sm, EAPOL_eapReq, FALSE);
- eapol_set_bool(sm, EAPOL_eapNoResp, TRUE);
+ eapol_set_bool(sm, EAPOL_eapFail, true);
+ eapol_set_bool(sm, EAPOL_eapReq, false);
+ eapol_set_bool(sm, EAPOL_eapNoResp, true);
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_FAILURE
"EAP authentication failed");
sm->prev_failure = 1;
@@ -1957,10 +1957,10 @@
}
wpa_hexdump_key(MSG_DEBUG, "EAP: ERP rMSK",
sm->eapKeyData, sm->eapKeyDataLen);
- sm->eapKeyAvailable = TRUE;
- eapol_set_bool(sm, EAPOL_eapSuccess, TRUE);
- eapol_set_bool(sm, EAPOL_eapReq, FALSE);
- eapol_set_bool(sm, EAPOL_eapNoResp, TRUE);
+ sm->eapKeyAvailable = true;
+ eapol_set_bool(sm, EAPOL_eapSuccess, true);
+ eapol_set_bool(sm, EAPOL_eapReq, false);
+ eapol_set_bool(sm, EAPOL_eapNoResp, true);
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS
"EAP re-authentication completed successfully");
#endif /* CONFIG_ERP */
@@ -1973,7 +1973,7 @@
size_t plen;
const u8 *pos;
- sm->rxReq = sm->rxResp = sm->rxSuccess = sm->rxFailure = FALSE;
+ sm->rxReq = sm->rxResp = sm->rxSuccess = sm->rxFailure = false;
sm->reqId = 0;
sm->reqMethod = EAP_TYPE_NONE;
sm->reqVendor = EAP_VENDOR_IETF;
@@ -2007,7 +2007,7 @@
"no Type field");
return;
}
- sm->rxReq = TRUE;
+ sm->rxReq = true;
pos = (const u8 *) (hdr + 1);
sm->reqMethod = *pos++;
if (sm->reqMethod == EAP_TYPE_EXPANDED) {
@@ -2038,7 +2038,7 @@
"EAP-Response - no Type field");
return;
}
- sm->rxResp = TRUE;
+ sm->rxResp = true;
pos = (const u8 *) (hdr + 1);
sm->reqMethod = *pos;
wpa_printf(MSG_DEBUG, "EAP: Received EAP-Response for "
@@ -2051,7 +2051,7 @@
case EAP_CODE_SUCCESS:
wpa_printf(MSG_DEBUG, "EAP: Received EAP-Success");
eap_notify_status(sm, "completion", "success");
- sm->rxSuccess = TRUE;
+ sm->rxSuccess = true;
break;
case EAP_CODE_FAILURE:
wpa_printf(MSG_DEBUG, "EAP: Received EAP-Failure");
@@ -2065,7 +2065,7 @@
if (error_code != NO_EAP_METHOD_ERROR)
eap_report_error(sm, error_code);
}
- sm->rxFailure = TRUE;
+ sm->rxFailure = true;
break;
case EAP_CODE_INITIATE:
eap_peer_initiate(sm, hdr, plen);
@@ -2233,7 +2233,7 @@
{
int res = 0;
do {
- sm->changed = FALSE;
+ sm->changed = false;
SM_STEP_RUN(EAP);
if (sm->changed)
res = 1;
@@ -2262,7 +2262,7 @@
/* This is not clearly specified in the EAP statemachines draft, but
* it seems necessary to make sure that some of the EAPOL variables get
* cleared for the next authentication. */
- eapol_set_bool(sm, EAPOL_eapSuccess, FALSE);
+ eapol_set_bool(sm, EAPOL_eapSuccess, false);
}
@@ -3005,8 +3005,8 @@
return;
if (sm->eapKeyData != NULL)
- sm->eapKeyAvailable = TRUE;
- eapol_set_bool(sm, EAPOL_eapSuccess, TRUE);
+ sm->eapKeyAvailable = true;
+ eapol_set_bool(sm, EAPOL_eapSuccess, true);
wpa_msg(sm->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS
"EAP authentication completed successfully (based on lower "
"layer success)");
diff --git a/src/eap_peer/eap.h b/src/eap_peer/eap.h
index acd70d0..a40d007 100644
--- a/src/eap_peer/eap.h
+++ b/src/eap_peer/eap.h
@@ -44,7 +44,7 @@
/**
* EAPOL_eapRestart - Lower layer request to restart authentication
*
- * Set to TRUE in lower layer, FALSE in EAP state machine.
+ * Set to true in lower layer, false in EAP state machine.
*/
EAPOL_eapRestart,
@@ -58,21 +58,21 @@
/**
* EAPOL_eapResp - Response to send
*
- * Set to TRUE in EAP state machine, FALSE in lower layer.
+ * Set to true in EAP state machine, false in lower layer.
*/
EAPOL_eapResp,
/**
* EAPOL_eapNoResp - Request has been process; no response to send
*
- * Set to TRUE in EAP state machine, FALSE in lower layer.
+ * Set to true in EAP state machine, false in lower layer.
*/
EAPOL_eapNoResp,
/**
* EAPOL_eapReq - EAP request available from lower layer
*
- * Set to TRUE in lower layer, FALSE in EAP state machine.
+ * Set to true in lower layer, false in EAP state machine.
*/
EAPOL_eapReq,
@@ -147,7 +147,7 @@
* @variable: EAPOL boolean variable to get
* Returns: Value of the EAPOL variable
*/
- Boolean (*get_bool)(void *ctx, enum eapol_bool_var variable);
+ bool (*get_bool)(void *ctx, enum eapol_bool_var variable);
/**
* set_bool - Set a boolean EAPOL state variable
@@ -155,8 +155,7 @@
* @variable: EAPOL boolean variable to set
* @value: Value for the EAPOL variable
*/
- void (*set_bool)(void *ctx, enum eapol_bool_var variable,
- Boolean value);
+ void (*set_bool)(void *ctx, enum eapol_bool_var variable, bool value);
/**
* get_int - Get an integer EAPOL state variable
diff --git a/src/eap_peer/eap_aka.c b/src/eap_peer/eap_aka.c
index d50bc61..e57461a 100644
--- a/src/eap_peer/eap_aka.c
+++ b/src/eap_peer/eap_aka.c
@@ -1365,24 +1365,24 @@
if (eap_get_config_identity(sm, &len) == NULL) {
wpa_printf(MSG_INFO, "EAP-AKA: Identity not configured");
eap_sm_request_identity(sm);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
pos = eap_hdr_validate(EAP_VENDOR_IETF, data->eap_method, reqData,
&len);
if (pos == NULL || len < 3) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
req = wpabuf_head(reqData);
id = req->identifier;
len = be_to_host16(req->length);
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
subtype = *pos++;
wpa_printf(MSG_DEBUG, "EAP-AKA: Subtype=%d", subtype);
@@ -1441,14 +1441,14 @@
ret->methodState = METHOD_CONT;
if (ret->methodState == METHOD_DONE) {
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
}
return res;
}
-static Boolean eap_aka_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_aka_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_aka_data *data = priv;
return data->pseudonym || data->reauth_id;
@@ -1497,7 +1497,7 @@
}
-static Boolean eap_aka_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_aka_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_aka_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_eke.c b/src/eap_peer/eap_eke.c
index 534af26..9029442 100644
--- a/src/eap_peer/eap_eke.c
+++ b/src/eap_peer/eap_eke.c
@@ -211,7 +211,7 @@
eap_eke_state(data, FAILURE);
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return resp;
}
@@ -617,7 +617,7 @@
eap_eke_state(data, SUCCESS);
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_COND_SUCC;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return resp;
}
@@ -656,7 +656,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_EKE, reqData, &len);
if (pos == NULL || len < 1) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -666,10 +666,10 @@
wpa_printf(MSG_DEBUG, "EAP-EKE: Received frame: exch %d", eke_exch);
wpa_hexdump(MSG_DEBUG, "EAP-EKE: Received Data", pos, end - pos);
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
switch (eke_exch) {
case EAP_EKE_ID:
@@ -689,18 +689,18 @@
break;
default:
wpa_printf(MSG_DEBUG, "EAP-EKE: Ignoring message with unknown EKE-Exch %d", eke_exch);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (ret->methodState == METHOD_DONE)
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return resp;
}
-static Boolean eap_eke_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_eke_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_eke_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index 0ed4a2b..b12cfee 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -1688,7 +1688,7 @@
#if 0 /* FIX */
-static Boolean eap_fast_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_fast_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_fast_data *data = priv;
return tls_connection_established(sm->ssl_ctx, data->ssl.conn);
@@ -1754,7 +1754,7 @@
}
-static Boolean eap_fast_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_fast_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_fast_data *data = priv;
return data->success;
diff --git a/src/eap_peer/eap_gpsk.c b/src/eap_peer/eap_gpsk.c
index f9c4d37..20d96c1 100644
--- a/src/eap_peer/eap_gpsk.c
+++ b/src/eap_peer/eap_gpsk.c
@@ -280,7 +280,7 @@
struct wpabuf *resp;
if (data->state != GPSK_1) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -588,7 +588,7 @@
const u8 *pos, *end;
if (data->state != GPSK_3) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -671,7 +671,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_GPSK, reqData, &len);
if (pos == NULL || len < 1) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -680,10 +680,10 @@
len--;
wpa_printf(MSG_DEBUG, "EAP-GPSK: Received frame: opcode %d", opcode);
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
switch (opcode) {
case EAP_GPSK_OPCODE_GPSK_1:
@@ -696,7 +696,7 @@
wpa_printf(MSG_DEBUG,
"EAP-GPSK: Ignoring message with unknown opcode %d",
opcode);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -704,7 +704,7 @@
}
-static Boolean eap_gpsk_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_gpsk_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_gpsk_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_gtc.c b/src/eap_peer/eap_gtc.c
index a519a78..72c02cc 100644
--- a/src/eap_peer/eap_gtc.c
+++ b/src/eap_peer/eap_gtc.c
@@ -54,7 +54,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_GTC, reqData, &len);
if (pos == NULL) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
id = eap_get_id(reqData);
@@ -85,15 +85,15 @@
if (password == NULL) {
wpa_printf(MSG_INFO, "EAP-GTC: Password not configured");
eap_sm_request_otp(sm, (const char *) pos, len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = data->prefix ? METHOD_MAY_CONT : METHOD_DONE;
ret->decision = DECISION_COND_SUCC;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
plen = password_len;
identity = eap_get_config_identity(sm, &identity_len);
diff --git a/src/eap_peer/eap_i.h b/src/eap_peer/eap_i.h
index 8f29d4a..f43891e 100644
--- a/src/eap_peer/eap_i.h
+++ b/src/eap_peer/eap_i.h
@@ -38,7 +38,7 @@
/**
* ignore - Whether method decided to drop the current packed (OUT)
*/
- Boolean ignore;
+ bool ignore;
/**
* methodState - Method-specific state (IN/OUT)
@@ -53,7 +53,7 @@
/**
* allowNotifications - Whether method allows notifications (OUT)
*/
- Boolean allowNotifications;
+ bool allowNotifications;
};
@@ -123,9 +123,9 @@
* isKeyAvailable - Find out whether EAP method has keying material
* @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
* @priv: Pointer to private EAP method data from eap_method::init()
- * Returns: %TRUE if key material (eapKeyData) is available
+ * Returns: %true if key material (eapKeyData) is available
*/
- Boolean (*isKeyAvailable)(struct eap_sm *sm, void *priv);
+ bool (*isKeyAvailable)(struct eap_sm *sm, void *priv);
/**
* getKey - Get EAP method specific keying material (eapKeyData)
@@ -161,13 +161,13 @@
* has_reauth_data - Whether method is ready for fast reauthentication
* @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
* @priv: Pointer to private EAP method data from eap_method::init()
- * Returns: %TRUE or %FALSE based on whether fast reauthentication is
+ * Returns: %true or %false based on whether fast reauthentication is
* possible
*
* This function is an optional handler that only EAP methods
* supporting fast re-authentication need to implement.
*/
- Boolean (*has_reauth_data)(struct eap_sm *sm, void *priv);
+ bool (*has_reauth_data)(struct eap_sm *sm, void *priv);
/**
* deinit_for_reauth - Release data that is not needed for fast re-auth
@@ -318,39 +318,39 @@
struct wpabuf *lastRespData;
EapDecision decision;
/* Short-term local variables */
- Boolean rxReq;
- Boolean rxSuccess;
- Boolean rxFailure;
+ bool rxReq;
+ bool rxSuccess;
+ bool rxFailure;
int reqId;
enum eap_type reqMethod;
int reqVendor;
u32 reqVendorMethod;
- Boolean ignore;
+ bool ignore;
/* Constants */
int ClientTimeout;
/* Miscellaneous variables */
- Boolean allowNotifications; /* peer state machine <-> methods */
+ bool allowNotifications; /* peer state machine <-> methods */
struct wpabuf *eapRespData; /* peer to lower layer */
- Boolean eapKeyAvailable; /* peer to lower layer */
+ bool eapKeyAvailable; /* peer to lower layer */
u8 *eapKeyData; /* peer to lower layer */
size_t eapKeyDataLen; /* peer to lower layer */
u8 *eapSessionId; /* peer to lower layer */
size_t eapSessionIdLen; /* peer to lower layer */
const struct eap_method *m; /* selected EAP method */
/* not defined in RFC 4137 */
- Boolean changed;
+ bool changed;
void *eapol_ctx;
const struct eapol_callbacks *eapol_cb;
void *eap_method_priv;
int init_phase2;
int fast_reauth;
- Boolean reauthInit; /* send EAP-Identity/Re-auth */
+ bool reauthInit; /* send EAP-Identity/Re-auth */
u32 erp_seq;
- Boolean rxResp /* LEAP only */;
- Boolean leap_done;
- Boolean peap_done;
+ bool rxResp /* LEAP only */;
+ bool leap_done;
+ bool peap_done;
u8 req_sha1[20]; /* SHA1() of the current EAP packet */
u8 last_sha1[20]; /* SHA1() of the previously received EAP packet; used
* in duplicate request detection. */
diff --git a/src/eap_peer/eap_ikev2.c b/src/eap_peer/eap_ikev2.c
index 6ddf508..b49fe16 100644
--- a/src/eap_peer/eap_ikev2.c
+++ b/src/eap_peer/eap_ikev2.c
@@ -138,9 +138,9 @@
u8 flags;
size_t send_len, plen, icv_len = 0;
- ret->ignore = FALSE;
+ ret->ignore = false;
wpa_printf(MSG_DEBUG, "EAP-IKEV2: Generating Response");
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
flags = 0;
send_len = wpabuf_len(data->out_buf) - data->out_used;
@@ -293,7 +293,7 @@
if (data->in_buf == NULL && !(flags & IKEV2_FLAGS_LENGTH_INCLUDED)) {
wpa_printf(MSG_DEBUG, "EAP-IKEV2: No Message Length field in "
"a fragmented packet");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -303,14 +303,14 @@
/* Limit maximum memory allocation */
wpa_printf(MSG_DEBUG,
"EAP-IKEV2: Ignore too long message");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
data->in_buf = wpabuf_alloc(message_length);
if (data->in_buf == NULL) {
wpa_printf(MSG_DEBUG, "EAP-IKEV2: No memory for "
"message");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpabuf_put_data(data->in_buf, buf, len);
@@ -320,7 +320,7 @@
(unsigned long) wpabuf_tailroom(data->in_buf));
}
- ret->ignore = FALSE;
+ ret->ignore = false;
return eap_ikev2_build_frag_ack(id, EAP_CODE_RESPONSE);
}
@@ -338,7 +338,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_IKEV2, reqData, &len);
if (pos == NULL) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -355,14 +355,14 @@
if (eap_ikev2_process_icv(data, reqData, flags, pos, &end,
data->state == WAIT_FRAG_ACK && len == 0) < 0)
{
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (flags & IKEV2_FLAGS_LENGTH_INCLUDED) {
if (end - pos < 4) {
wpa_printf(MSG_DEBUG, "EAP-IKEV2: Message underflow");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
message_length = WPA_GET_BE32(pos);
@@ -372,7 +372,7 @@
wpa_printf(MSG_DEBUG, "EAP-IKEV2: Invalid Message "
"Length (%d; %ld remaining in this msg)",
message_length, (long) (end - pos));
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
@@ -384,7 +384,7 @@
if (len != 0) {
wpa_printf(MSG_DEBUG, "EAP-IKEV2: Unexpected payload "
"in WAIT_FRAG_ACK state");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_printf(MSG_DEBUG, "EAP-IKEV2: Fragment acknowledged");
@@ -393,10 +393,10 @@
}
if (data->in_buf && eap_ikev2_process_cont(data, pos, end - pos) < 0) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
-
+
if (flags & IKEV2_FLAGS_MORE_FRAGMENTS) {
return eap_ikev2_process_fragment(data, ret, id, flags,
message_length, pos,
@@ -435,7 +435,7 @@
}
-static Boolean eap_ikev2_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_ikev2_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_ikev2_data *data = priv;
return data->state == DONE && data->keymat_ok;
diff --git a/src/eap_peer/eap_leap.c b/src/eap_peer/eap_leap.c
index 34758e0..02daddf 100644
--- a/src/eap_peer/eap_leap.c
+++ b/src/eap_peer/eap_leap.c
@@ -45,7 +45,7 @@
return NULL;
data->state = LEAP_WAIT_CHALLENGE;
- sm->leap_done = FALSE;
+ sm->leap_done = false;
return data;
}
@@ -77,14 +77,14 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_LEAP, reqData, &len);
if (pos == NULL || len < 3) {
wpa_printf(MSG_INFO, "EAP-LEAP: Invalid EAP-Request frame");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (*pos != LEAP_VERSION) {
wpa_printf(MSG_WARNING, "EAP-LEAP: Unsupported LEAP version "
"%d", *pos);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
pos++;
@@ -96,7 +96,7 @@
wpa_printf(MSG_INFO, "EAP-LEAP: Invalid challenge "
"(challenge_len=%d reqDataLen=%lu)",
challenge_len, (unsigned long) wpabuf_len(reqData));
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
challenge = pos;
@@ -119,7 +119,7 @@
(!pwhash &&
nt_challenge_response(challenge, password, password_len, rpos))) {
wpa_printf(MSG_DEBUG, "EAP-LEAP: Failed to derive response");
- ret->ignore = TRUE;
+ ret->ignore = true;
wpabuf_free(resp);
return NULL;
}
@@ -153,7 +153,7 @@
if (data->state != LEAP_WAIT_SUCCESS) {
wpa_printf(MSG_INFO, "EAP-LEAP: EAP-Success received in "
"unexpected state (%d) - ignored", data->state);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -170,7 +170,7 @@
wpa_printf(MSG_WARNING, "EAP-LEAP: Failed to read random data "
"for challenge");
wpabuf_free(resp);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
os_memcpy(data->ap_challenge, pos, LEAP_CHALLENGE_LEN);
@@ -204,14 +204,14 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_LEAP, reqData, &len);
if (pos == NULL || len < 3) {
wpa_printf(MSG_INFO, "EAP-LEAP: Invalid EAP-Response frame");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (*pos != LEAP_VERSION) {
wpa_printf(MSG_WARNING, "EAP-LEAP: Unsupported LEAP version "
"%d", *pos);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
pos++;
@@ -223,7 +223,7 @@
wpa_printf(MSG_INFO, "EAP-LEAP: Invalid response "
"(response_len=%d reqDataLen=%lu)",
response_len, (unsigned long) wpabuf_len(reqData));
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -233,23 +233,23 @@
if (pwhash) {
if (hash_nt_password_hash(password, pw_hash_hash)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
} else {
if (nt_password_hash(password, password_len, pw_hash) ||
hash_nt_password_hash(pw_hash, pw_hash_hash)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
if (challenge_response(data->ap_challenge, pw_hash_hash, expected)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
ret->methodState = METHOD_DONE;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
if (os_memcmp_const(pos, expected, LEAP_RESPONSE_LEN) != 0) {
wpa_printf(MSG_WARNING, "EAP-LEAP: AP sent an invalid "
@@ -265,7 +265,7 @@
/* LEAP is somewhat odd method since it sends EAP-Success in the middle
* of the authentication. Use special variable to transit EAP state
* machine to SUCCESS state. */
- sm->leap_done = TRUE;
+ sm->leap_done = true;
data->state = LEAP_DONE;
/* No more authentication messages expected; AP will send EAPOL-Key
@@ -286,7 +286,7 @@
if (password == NULL) {
wpa_printf(MSG_INFO, "EAP-LEAP: Password not configured");
eap_sm_request_password(sm);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -300,16 +300,16 @@
if (wpabuf_len(reqData) < sizeof(*eap) ||
be_to_host16(eap->length) > wpabuf_len(reqData)) {
wpa_printf(MSG_INFO, "EAP-LEAP: Invalid frame");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
- ret->allowNotifications = TRUE;
+ ret->ignore = false;
+ ret->allowNotifications = true;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- sm->leap_done = FALSE;
+ sm->leap_done = false;
switch (eap->code) {
case EAP_CODE_REQUEST:
@@ -321,13 +321,13 @@
default:
wpa_printf(MSG_INFO, "EAP-LEAP: Unexpected EAP code (%d) - "
"ignored", eap->code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
-static Boolean eap_leap_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_leap_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_leap_data *data = priv;
return data->state == LEAP_DONE;
diff --git a/src/eap_peer/eap_md5.c b/src/eap_peer/eap_md5.c
index efae8de..14ac569 100644
--- a/src/eap_peer/eap_md5.c
+++ b/src/eap_peer/eap_md5.c
@@ -39,7 +39,7 @@
if (password == NULL) {
wpa_printf(MSG_INFO, "EAP-MD5: Password not configured");
eap_sm_request_password(sm);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -47,7 +47,7 @@
if (pos == NULL || len == 0) {
wpa_printf(MSG_INFO, "EAP-MD5: Invalid frame (pos=%p len=%lu)",
pos, (unsigned long) len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -60,10 +60,10 @@
wpa_printf(MSG_INFO, "EAP-MD5: Invalid challenge "
"(challenge_len=%lu len=%lu)",
(unsigned long) challenge_len, (unsigned long) len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
+ ret->ignore = false;
challenge = pos;
wpa_hexdump(MSG_MSGDUMP, "EAP-MD5: Challenge",
challenge, challenge_len);
@@ -71,7 +71,7 @@
wpa_printf(MSG_DEBUG, "EAP-MD5: Generating Challenge Response");
ret->methodState = METHOD_DONE;
ret->decision = DECISION_COND_SUCC;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MD5, 1 + CHAP_MD5_LEN,
EAP_CODE_RESPONSE, eap_get_id(reqData));
@@ -89,7 +89,7 @@
if (chap_md5(id, password, password_len, challenge, challenge_len,
rpos)) {
wpa_printf(MSG_INFO, "EAP-MD5: CHAP MD5 operation failed");
- ret->ignore = TRUE;
+ ret->ignore = true;
wpabuf_free(resp);
return NULL;
}
diff --git a/src/eap_peer/eap_mschapv2.c b/src/eap_peer/eap_mschapv2.c
index 249baec..8ad4d18 100644
--- a/src/eap_peer/eap_mschapv2.c
+++ b/src/eap_peer/eap_mschapv2.c
@@ -250,7 +250,7 @@
if (req_len < sizeof(*req) + 1) {
wpa_printf(MSG_INFO, "EAP-MSCHAPV2: Too short challenge data "
"(len %lu)", (unsigned long) req_len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
pos = (const u8 *) (req + 1);
@@ -259,7 +259,7 @@
if (challenge_len != MSCHAPV2_CHAL_LEN) {
wpa_printf(MSG_INFO, "EAP-MSCHAPV2: Invalid challenge length "
"%lu", (unsigned long) challenge_len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -267,7 +267,7 @@
wpa_printf(MSG_INFO, "EAP-MSCHAPV2: Too short challenge"
" packet: len=%lu challenge_len=%lu",
(unsigned long) len, (unsigned long) challenge_len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -282,10 +282,10 @@
wpa_hexdump_ascii(MSG_DEBUG, "EAP-MSCHAPV2: Authentication Servername",
pos, len);
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
return eap_mschapv2_challenge_reply(sm, data, id, req->mschapv2_id,
challenge);
@@ -377,7 +377,7 @@
if (resp == NULL) {
wpa_printf(MSG_DEBUG, "EAP-MSCHAPV2: Failed to allocate "
"buffer for success response");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -385,7 +385,7 @@
ret->methodState = METHOD_DONE;
ret->decision = DECISION_UNCOND_SUCC;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
data->success = 1;
if (data->prev_error == ERROR_PASSWD_EXPIRED)
@@ -531,10 +531,10 @@
username = mschapv2_remove_domain(username, &username_len);
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_COND_SUCC;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
ms_len = sizeof(*ms) + sizeof(*cp);
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, ms_len,
@@ -672,10 +672,10 @@
os_free(buf);
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
if (data->prev_error == ERROR_PASSWD_EXPIRED &&
data->passwd_change_version == 3) {
@@ -783,7 +783,7 @@
u8 id;
if (eap_mschapv2_check_config(sm)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -800,13 +800,13 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, reqData,
&len);
if (pos == NULL || len < sizeof(*ms) + 1) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
ms = (const struct eap_mschapv2_hdr *) pos;
if (eap_mschapv2_check_mslen(sm, len, ms)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -826,13 +826,13 @@
default:
wpa_printf(MSG_INFO, "EAP-MSCHAPV2: Unknown op %d - ignored",
ms->op_code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
-static Boolean eap_mschapv2_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_mschapv2_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_mschapv2_data *data = priv;
return data->success && data->master_key_valid;
diff --git a/src/eap_peer/eap_otp.c b/src/eap_peer/eap_otp.c
index 0ab4c79..87615c6 100644
--- a/src/eap_peer/eap_otp.c
+++ b/src/eap_peer/eap_otp.c
@@ -36,7 +36,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_OTP, reqData, &len);
if (pos == NULL) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_hexdump_ascii(MSG_MSGDUMP, "EAP-OTP: Request message",
@@ -53,15 +53,15 @@
if (password == NULL) {
wpa_printf(MSG_INFO, "EAP-OTP: Password not configured");
eap_sm_request_otp(sm, (const char *) pos, len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_DONE;
ret->decision = DECISION_COND_SUCC;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_OTP, password_len,
EAP_CODE_RESPONSE, eap_get_id(reqData));
diff --git a/src/eap_peer/eap_pax.c b/src/eap_peer/eap_pax.c
index 3cef1c8..a641d44 100644
--- a/src/eap_peer/eap_pax.c
+++ b/src/eap_peer/eap_pax.c
@@ -127,14 +127,14 @@
if (data->state != PAX_INIT) {
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-1 received in "
"unexpected state (%d) - ignored", data->state);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (req->flags & EAP_PAX_FLAGS_CE) {
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-1 with CE flag set - "
"ignored");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -143,7 +143,7 @@
if (left < 2 + EAP_PAX_RAND_LEN) {
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-1 with too short "
"payload");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -152,7 +152,7 @@
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-1 with incorrect A "
"length %d (expected %d)",
WPA_GET_BE16(pos), EAP_PAX_RAND_LEN);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -171,7 +171,7 @@
if (random_get_bytes(data->rand.r.y, EAP_PAX_RAND_LEN)) {
wpa_printf(MSG_ERROR, "EAP-PAX: Failed to get random data");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_hexdump(MSG_MSGDUMP, "EAP-PAX: Y (client rand)",
@@ -180,7 +180,7 @@
if (eap_pax_initial_key_derivation(req->mac_id, data->ak, data->rand.e,
data->mk, data->ck, data->ick,
data->mid) < 0) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -243,14 +243,14 @@
if (data->state != PAX_STD_2_SENT) {
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-3 received in "
"unexpected state (%d) - ignored", data->state);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (req->flags & EAP_PAX_FLAGS_CE) {
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-3 with CE flag set - "
"ignored");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -259,7 +259,7 @@
if (left < 2 + EAP_PAX_MAC_LEN) {
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-3 with too short "
"payload");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -268,7 +268,7 @@
wpa_printf(MSG_INFO, "EAP-PAX: PAX_STD-3 with incorrect "
"MAC_CK length %d (expected %d)",
WPA_GET_BE16(pos), EAP_PAX_MAC_LEN);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
pos += 2;
@@ -323,7 +323,7 @@
data->state = PAX_DONE;
ret->methodState = METHOD_DONE;
ret->decision = DECISION_UNCOND_SUCC;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return resp;
}
@@ -343,7 +343,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PAX, reqData, &len);
if (pos == NULL || len < sizeof(*req) + EAP_PAX_ICV_LEN) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
id = eap_get_id(reqData);
@@ -363,7 +363,7 @@
wpa_printf(MSG_INFO, "EAP-PAX: MAC ID changed during "
"authentication (was 0x%d, is 0x%d)",
data->mac_id, req->mac_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -371,7 +371,7 @@
wpa_printf(MSG_INFO, "EAP-PAX: DH Group ID changed during "
"authentication (was 0x%d, is 0x%d)",
data->dh_group_id, req->dh_group_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -380,7 +380,7 @@
wpa_printf(MSG_INFO, "EAP-PAX: Public Key ID changed during "
"authentication (was 0x%d, is 0x%d)",
data->public_key_id, req->public_key_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -388,21 +388,21 @@
if (req->mac_id != EAP_PAX_MAC_HMAC_SHA1_128) {
wpa_printf(MSG_INFO, "EAP-PAX: Unsupported MAC ID 0x%x",
req->mac_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (req->dh_group_id != EAP_PAX_DH_GROUP_NONE) {
wpa_printf(MSG_INFO, "EAP-PAX: Unsupported DH Group ID 0x%x",
req->dh_group_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (req->public_key_id != EAP_PAX_PUBLIC_KEY_NONE) {
wpa_printf(MSG_INFO, "EAP-PAX: Unsupported Public Key ID 0x%x",
req->public_key_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -410,7 +410,7 @@
/* TODO: add support for reassembling fragments */
wpa_printf(MSG_INFO, "EAP-PAX: fragmentation not supported - "
"ignored packet");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -430,14 +430,14 @@
"message");
wpa_hexdump(MSG_MSGDUMP, "EAP-PAX: expected ICV",
icvbuf, EAP_PAX_ICV_LEN);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
switch (req->op_code) {
case EAP_PAX_OP_STD_1:
@@ -449,19 +449,19 @@
default:
wpa_printf(MSG_DEBUG, "EAP-PAX: ignoring message with unknown "
"op_code %d", req->op_code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (ret->methodState == METHOD_DONE) {
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
}
return resp;
}
-static Boolean eap_pax_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_pax_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_pax_data *data = priv;
return data->state == PAX_DONE;
diff --git a/src/eap_peer/eap_peap.c b/src/eap_peer/eap_peap.c
index 92b15ec..7c37043 100644
--- a/src/eap_peer/eap_peap.c
+++ b/src/eap_peer/eap_peap.c
@@ -137,7 +137,7 @@
data = os_zalloc(sizeof(*data));
if (data == NULL)
return NULL;
- sm->peap_done = FALSE;
+ sm->peap_done = false;
data->peap_version = EAP_PEAP_VERSION;
data->force_peap_version = -1;
data->peap_outer_success = 2;
@@ -920,7 +920,7 @@
/* No EAP-Success expected for Phase 1 (outer,
* unencrypted auth), so force EAP state
* machine to SUCCESS state. */
- sm->peap_done = TRUE;
+ sm->peap_done = true;
}
} else {
/* FIX: ? */
@@ -930,7 +930,7 @@
wpa_printf(MSG_DEBUG, "EAP-PEAP: Phase 2 Failure");
ret->decision = DECISION_FAIL;
ret->methodState = METHOD_MAY_CONT;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
/* Reply with EAP-Failure within the TLS channel to complete
* failure reporting. */
resp = wpabuf_alloc(sizeof(struct eap_hdr));
@@ -1014,7 +1014,7 @@
data->force_peap_version);
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return NULL;
}
wpa_printf(MSG_DEBUG, "EAP-PEAP: Using PEAP version %d",
@@ -1166,7 +1166,7 @@
}
if (ret->methodState == METHOD_DONE) {
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
}
if (res == 1) {
@@ -1179,7 +1179,7 @@
}
-static Boolean eap_peap_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_peap_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_peap_data *data = priv;
return tls_connection_established(sm->ssl_ctx, data->ssl.conn) &&
@@ -1220,7 +1220,7 @@
data->phase2_eap_started = 0;
data->resuming = 1;
data->reauth = 1;
- sm->peap_done = FALSE;
+ sm->peap_done = false;
return priv;
}
@@ -1245,7 +1245,7 @@
}
-static Boolean eap_peap_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_peap_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_peap_data *data = priv;
return data->key_data != NULL && data->phase2_success;
diff --git a/src/eap_peer/eap_psk.c b/src/eap_peer/eap_psk.c
index eea9430..4997e6a 100644
--- a/src/eap_peer/eap_psk.c
+++ b/src/eap_peer/eap_psk.c
@@ -100,7 +100,7 @@
"length (%lu; expected %lu or more)",
(unsigned long) len,
(unsigned long) sizeof(*hdr1));
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_printf(MSG_DEBUG, "EAP-PSK: Flags=0x%x", hdr1->flags);
@@ -120,7 +120,7 @@
if (data->id_s == NULL) {
wpa_printf(MSG_ERROR, "EAP-PSK: Failed to allocate memory for "
"ID_S (len=%lu)", (unsigned long) data->id_s_len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_hexdump_ascii(MSG_DEBUG, "EAP-PSK: ID_S",
@@ -128,7 +128,7 @@
if (random_get_bytes(data->rand_p, EAP_PSK_RAND_LEN)) {
wpa_printf(MSG_ERROR, "EAP-PSK: Failed to get random data");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -198,7 +198,7 @@
"length (%lu; expected %lu or more)",
(unsigned long) len,
(unsigned long) sizeof(*hdr3));
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
left = len - sizeof(*hdr3);
@@ -220,7 +220,7 @@
wpa_printf(MSG_INFO, "EAP-PSK: Too short PCHANNEL data in "
"third message (len=%lu, expected 21)",
(unsigned long) left);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -377,14 +377,14 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PSK, reqData, &len);
if (pos == NULL) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
switch (data->state) {
case PSK_INIT:
@@ -396,19 +396,19 @@
case PSK_DONE:
wpa_printf(MSG_DEBUG, "EAP-PSK: in DONE state - ignore "
"unexpected message");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (ret->methodState == METHOD_DONE) {
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
}
return resp;
}
-static Boolean eap_psk_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_psk_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_psk_data *data = priv;
return data->state == PSK_DONE;
diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
index 54f102a..605feb2 100644
--- a/src/eap_peer/eap_pwd.c
+++ b/src/eap_peer/eap_pwd.c
@@ -257,13 +257,13 @@
struct eap_pwd_id *id;
if (data->state != PWD_ID_Req) {
- ret->ignore = TRUE;
+ ret->ignore = true;
eap_pwd_state(data, FAILURE);
return;
}
if (payload_len < sizeof(struct eap_pwd_id)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
eap_pwd_state(data, FAILURE);
return;
}
@@ -369,14 +369,14 @@
int res;
if (data->state != PWD_Commit_Req) {
- ret->ignore = TRUE;
+ ret->ignore = true;
goto fin;
}
if (!data->grp) {
wpa_printf(MSG_DEBUG,
"EAP-PWD (client): uninitialized EAP-pwd group");
- ret->ignore = TRUE;
+ ret->ignore = true;
goto fin;
}
@@ -696,7 +696,7 @@
size_t prime_len = 0, order_len = 0;
if (data->state != PWD_Confirm_Req) {
- ret->ignore = TRUE;
+ ret->ignore = true;
goto fin;
}
@@ -878,14 +878,14 @@
wpa_printf(MSG_DEBUG, "EAP-pwd: Got a frame but pos is %s and "
"len is %d",
pos == NULL ? "NULL" : "not NULL", (int) len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
lm_exch = *pos;
pos++; /* skip over the bits and the exch */
@@ -951,7 +951,7 @@
if (len < 2) {
wpa_printf(MSG_DEBUG,
"EAP-pwd: Frame too short to contain Total-Length field");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
tot_len = WPA_GET_BE16(pos);
@@ -962,7 +962,7 @@
if (data->inbuf) {
wpa_printf(MSG_DEBUG,
"EAP-pwd: Unexpected new fragment start when previous fragment is still in use");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
data->inbuf = wpabuf_alloc(tot_len);
@@ -1107,7 +1107,7 @@
}
-static Boolean eap_pwd_key_available(struct eap_sm *sm, void *priv)
+static bool eap_pwd_key_available(struct eap_sm *sm, void *priv)
{
struct eap_pwd_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_sake.c b/src/eap_peer/eap_sake.c
index 255241f..39c195d 100644
--- a/src/eap_peer/eap_sake.c
+++ b/src/eap_peer/eap_sake.c
@@ -148,7 +148,7 @@
struct wpabuf *resp;
if (data->state != IDENTITY) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -195,7 +195,7 @@
if (data->state != IDENTITY && data->state != CHALLENGE) {
wpa_printf(MSG_DEBUG, "EAP-SAKE: Request/Challenge received "
"in unexpected state (%d)", data->state);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (data->state == IDENTITY)
@@ -296,7 +296,7 @@
u8 *rpos;
if (data->state != CONFIRM) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -320,7 +320,7 @@
eap_sake_state(data, FAILURE);
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
wpa_printf(MSG_DEBUG, "EAP-SAKE: Sending Response/Auth-Reject");
return eap_sake_build_msg(data, id, 0,
EAP_SAKE_SUBTYPE_AUTH_REJECT);
@@ -330,7 +330,7 @@
eap_sake_state(data, FAILURE);
ret->methodState = METHOD_DONE;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
wpa_printf(MSG_DEBUG, "EAP-SAKE: Sending "
"Response/Auth-Reject");
return eap_sake_build_msg(data, id, 0,
@@ -361,7 +361,7 @@
eap_sake_state(data, SUCCESS);
ret->methodState = METHOD_DONE;
ret->decision = DECISION_UNCOND_SUCC;
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return resp;
}
@@ -380,7 +380,7 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_SAKE, reqData, &len);
if (pos == NULL || len < sizeof(struct eap_sake_hdr)) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -399,16 +399,16 @@
if (data->session_id_set && data->session_id != session_id) {
wpa_printf(MSG_INFO, "EAP-SAKE: Session ID mismatch (%d,%d)",
session_id, data->session_id);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
data->session_id = session_id;
data->session_id_set = 1;
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
switch (subtype) {
case EAP_SAKE_SUBTYPE_IDENTITY:
@@ -426,18 +426,18 @@
default:
wpa_printf(MSG_DEBUG, "EAP-SAKE: Ignoring message with "
"unknown subtype %d", subtype);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (ret->methodState == METHOD_DONE)
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
return resp;
}
-static Boolean eap_sake_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_sake_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_sake_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_sim.c b/src/eap_peer/eap_sim.c
index dd9848e..eaa1ad7 100644
--- a/src/eap_peer/eap_sim.c
+++ b/src/eap_peer/eap_sim.c
@@ -1104,23 +1104,23 @@
if (eap_get_config_identity(sm, &len) == NULL) {
wpa_printf(MSG_INFO, "EAP-SIM: Identity not configured");
eap_sm_request_identity(sm);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_SIM, reqData, &len);
if (pos == NULL || len < 3) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
req = wpabuf_head(reqData);
id = req->identifier;
len = be_to_host16(req->length);
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
subtype = *pos++;
wpa_printf(MSG_DEBUG, "EAP-SIM: Subtype=%d", subtype);
@@ -1173,14 +1173,14 @@
ret->methodState = METHOD_CONT;
if (ret->methodState == METHOD_DONE) {
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
}
return res;
}
-static Boolean eap_sim_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_sim_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_sim_data *data = priv;
return data->pseudonym || data->reauth_id;
@@ -1231,7 +1231,7 @@
}
-static Boolean eap_sim_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_sim_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_sim_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_teap.c b/src/eap_peer/eap_teap.c
index f751fbe..76179a3 100644
--- a/src/eap_peer/eap_teap.c
+++ b/src/eap_peer/eap_teap.c
@@ -1985,7 +1985,7 @@
#if 0 /* TODO */
-static Boolean eap_teap_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_teap_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_teap_data *data = priv;
@@ -2048,7 +2048,7 @@
}
-static Boolean eap_teap_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_teap_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_teap_data *data = priv;
diff --git a/src/eap_peer/eap_tls.c b/src/eap_peer/eap_tls.c
index d9771f6..ad079a7 100644
--- a/src/eap_peer/eap_tls.c
+++ b/src/eap_peer/eap_tls.c
@@ -62,12 +62,12 @@
wpa_printf(MSG_DEBUG, "EAP-TLS: Requesting Smartcard "
"PIN");
eap_sm_request_pin(sm);
- sm->ignore = TRUE;
+ sm->ignore = true;
} else if (cert->private_key && !cert->private_key_passwd) {
wpa_printf(MSG_DEBUG, "EAP-TLS: Requesting private "
"key passphrase");
eap_sm_request_passphrase(sm);
- sm->ignore = TRUE;
+ sm->ignore = true;
}
return NULL;
}
@@ -326,7 +326,7 @@
}
-static Boolean eap_tls_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_tls_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_tls_data *data = priv;
return tls_connection_established(data->ssl_ctx, data->ssl.conn);
@@ -364,7 +364,7 @@
}
-static Boolean eap_tls_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_tls_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_tls_data *data = priv;
return data->key_data != NULL;
diff --git a/src/eap_peer/eap_tls_common.c b/src/eap_peer/eap_tls_common.c
index 80e2d71..ab10678 100644
--- a/src/eap_peer/eap_tls_common.c
+++ b/src/eap_peer/eap_tls_common.c
@@ -269,12 +269,12 @@
os_free(config->cert.pin);
config->cert.pin = NULL;
eap_sm_request_pin(sm);
- sm->ignore = TRUE;
+ sm->ignore = true;
} else if (res == TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED) {
wpa_printf(MSG_INFO, "TLS: Failed to initialize engine");
} else if (res == TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED) {
wpa_printf(MSG_INFO, "TLS: Failed to load private key");
- sm->ignore = TRUE;
+ sm->ignore = true;
}
if (res) {
wpa_printf(MSG_INFO, "TLS: Failed to set TLS connection "
@@ -913,7 +913,7 @@
if (tls_get_errors(data->ssl_ctx)) {
wpa_printf(MSG_INFO, "SSL: TLS errors detected");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -929,14 +929,14 @@
pos = eap_hdr_validate(EAP_VENDOR_IETF, eap_type, reqData,
&left);
if (pos == NULL) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (left == 0) {
wpa_printf(MSG_DEBUG, "SSL: Invalid TLS message: no Flags "
"octet included");
if (!sm->workaround) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -954,7 +954,7 @@
if (left < 4) {
wpa_printf(MSG_INFO, "SSL: Short frame with TLS "
"length");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
tls_msg_len = WPA_GET_BE32(pos);
@@ -973,15 +973,15 @@
wpa_printf(MSG_INFO, "SSL: TLS Message Length (%d "
"bytes) smaller than this fragment (%d "
"bytes)", (int) tls_msg_len, (int) left);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_FAIL;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
*len = left;
return pos;
diff --git a/src/eap_peer/eap_tnc.c b/src/eap_peer/eap_tnc.c
index 726221e..af17773 100644
--- a/src/eap_peer/eap_tnc.c
+++ b/src/eap_peer/eap_tnc.c
@@ -92,9 +92,9 @@
u8 flags;
size_t send_len, plen;
- ret->ignore = FALSE;
+ ret->ignore = false;
wpa_printf(MSG_DEBUG, "EAP-TNC: Generating Response");
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
flags = EAP_TNC_VERSION;
send_len = wpabuf_len(data->out_buf) - data->out_used;
@@ -174,7 +174,7 @@
if (data->in_buf == NULL && !(flags & EAP_TNC_FLAGS_LENGTH_INCLUDED)) {
wpa_printf(MSG_DEBUG, "EAP-TNC: No Message Length field in a "
"fragmented packet");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -184,7 +184,7 @@
if (data->in_buf == NULL) {
wpa_printf(MSG_DEBUG, "EAP-TNC: No memory for "
"message");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpabuf_put_data(data->in_buf, buf, len);
@@ -219,7 +219,7 @@
if (pos == NULL) {
wpa_printf(MSG_INFO, "EAP-TNC: Invalid frame (pos=%p len=%lu)",
pos, (unsigned long) len);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -235,14 +235,14 @@
if (len > 0 && (flags & EAP_TNC_VERSION_MASK) != EAP_TNC_VERSION) {
wpa_printf(MSG_DEBUG, "EAP-TNC: Unsupported version %d",
flags & EAP_TNC_VERSION_MASK);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (flags & EAP_TNC_FLAGS_LENGTH_INCLUDED) {
if (end - pos < 4) {
wpa_printf(MSG_DEBUG, "EAP-TNC: Message underflow");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
message_length = WPA_GET_BE32(pos);
@@ -253,7 +253,7 @@
wpa_printf(MSG_DEBUG, "EAP-TNC: Invalid Message "
"Length (%d; %ld remaining in this msg)",
message_length, (long) (end - pos));
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
@@ -265,7 +265,7 @@
if (len > 1) {
wpa_printf(MSG_DEBUG, "EAP-TNC: Unexpected payload in "
"WAIT_FRAG_ACK state");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_printf(MSG_DEBUG, "EAP-TNC: Fragment acknowledged");
@@ -274,10 +274,10 @@
}
if (data->in_buf && eap_tnc_process_cont(data, pos, end - pos) < 0) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
-
+
if (flags & EAP_TNC_FLAGS_MORE_FRAGMENTS) {
return eap_tnc_process_fragment(data, ret, id, flags,
message_length, pos,
@@ -294,7 +294,7 @@
if (!(flags & EAP_TNC_FLAGS_START)) {
wpa_printf(MSG_DEBUG, "EAP-TNC: Server did not use "
"start flag in the first message");
- ret->ignore = TRUE;
+ ret->ignore = true;
goto fail;
}
@@ -307,7 +307,7 @@
if (flags & EAP_TNC_FLAGS_START) {
wpa_printf(MSG_DEBUG, "EAP-TNC: Server used start "
"flag again");
- ret->ignore = TRUE;
+ ret->ignore = true;
goto fail;
}
@@ -316,7 +316,7 @@
wpabuf_len(data->in_buf));
switch (res) {
case TNCCS_PROCESS_ERROR:
- ret->ignore = TRUE;
+ ret->ignore = true;
goto fail;
case TNCCS_PROCESS_OK_NO_RECOMMENDATION:
case TNCCS_RECOMMENDATION_ERROR:
@@ -345,10 +345,10 @@
wpabuf_free(data->in_buf);
data->in_buf = NULL;
- ret->ignore = FALSE;
+ ret->ignore = false;
ret->methodState = METHOD_MAY_CONT;
ret->decision = DECISION_UNCOND_SUCC;
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
if (tncs_done) {
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_TNC, 1,
diff --git a/src/eap_peer/eap_ttls.c b/src/eap_peer/eap_ttls.c
index 662676f..642d179 100644
--- a/src/eap_peer/eap_ttls.c
+++ b/src/eap_peer/eap_ttls.c
@@ -1578,7 +1578,7 @@
struct eap_method_ret *ret)
{
if (ret->methodState == METHOD_DONE) {
- ret->allowNotifications = FALSE;
+ ret->allowNotifications = false;
if (ret->decision == DECISION_UNCOND_SUCC ||
ret->decision == DECISION_COND_SUCC) {
wpa_printf(MSG_DEBUG, "EAP-TTLS: Authentication "
@@ -1673,7 +1673,7 @@
}
-static Boolean eap_ttls_has_reauth_data(struct eap_sm *sm, void *priv)
+static bool eap_ttls_has_reauth_data(struct eap_sm *sm, void *priv)
{
struct eap_ttls_data *data = priv;
return tls_connection_established(sm->ssl_ctx, data->ssl.conn) &&
@@ -1764,7 +1764,7 @@
}
-static Boolean eap_ttls_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_ttls_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_ttls_data *data = priv;
return data->key_data != NULL && data->phase2_success;
diff --git a/src/eap_peer/eap_vendor_test.c b/src/eap_peer/eap_vendor_test.c
index 16e3c39..431f44b 100644
--- a/src/eap_peer/eap_vendor_test.c
+++ b/src/eap_peer/eap_vendor_test.c
@@ -75,28 +75,28 @@
pos = eap_hdr_validate(EAP_VENDOR_ID, EAP_VENDOR_TYPE, reqData, &len);
if (pos == NULL || len < 1) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (data->state == INIT && *pos != 1) {
wpa_printf(MSG_DEBUG, "EAP-VENDOR-TEST: Unexpected message "
"%d in INIT state", *pos);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (data->state == CONFIRM && *pos != 3) {
wpa_printf(MSG_DEBUG, "EAP-VENDOR-TEST: Unexpected message "
"%d in CONFIRM state", *pos);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (data->state == SUCCESS) {
wpa_printf(MSG_DEBUG, "EAP-VENDOR-TEST: Unexpected message "
"in SUCCESS state");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -105,17 +105,17 @@
data->first_try = 0;
wpa_printf(MSG_DEBUG, "EAP-VENDOR-TEST: Testing "
"pending request");
- ret->ignore = TRUE;
+ ret->ignore = true;
eloop_register_timeout(1, 0, eap_vendor_ready, sm,
NULL);
return NULL;
}
}
- ret->ignore = FALSE;
+ ret->ignore = false;
wpa_printf(MSG_DEBUG, "EAP-VENDOR-TEST: Generating Response");
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
resp = eap_msg_alloc(EAP_VENDOR_ID, EAP_VENDOR_TYPE, 1,
EAP_CODE_RESPONSE, eap_get_id(reqData));
@@ -138,7 +138,7 @@
}
-static Boolean eap_vendor_test_isKeyAvailable(struct eap_sm *sm, void *priv)
+static bool eap_vendor_test_isKeyAvailable(struct eap_sm *sm, void *priv)
{
struct eap_vendor_test_data *data = priv;
return data->state == SUCCESS;
diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c
index 92d5a02..a1e7bff 100644
--- a/src/eap_peer/eap_wsc.c
+++ b/src/eap_peer/eap_wsc.c
@@ -304,9 +304,9 @@
u8 flags;
size_t send_len, plen;
- ret->ignore = FALSE;
+ ret->ignore = false;
wpa_printf(MSG_DEBUG, "EAP-WSC: Generating Response");
- ret->allowNotifications = TRUE;
+ ret->allowNotifications = true;
flags = 0;
send_len = wpabuf_len(data->out_buf) - data->out_used;
@@ -400,7 +400,7 @@
if (data->in_buf == NULL && !(flags & WSC_FLAGS_LF)) {
wpa_printf(MSG_DEBUG, "EAP-WSC: No Message Length field in a "
"fragmented packet");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -410,7 +410,7 @@
if (data->in_buf == NULL) {
wpa_printf(MSG_DEBUG, "EAP-WSC: No memory for "
"message");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
data->in_op_code = op_code;
@@ -441,7 +441,7 @@
pos = eap_hdr_validate(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, reqData,
&len);
if (pos == NULL || len < 2) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -455,7 +455,7 @@
if (flags & WSC_FLAGS_LF) {
if (end - pos < 2) {
wpa_printf(MSG_DEBUG, "EAP-WSC: Message underflow");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
message_length = WPA_GET_BE16(pos);
@@ -464,7 +464,7 @@
if (message_length < end - pos || message_length > 50000) {
wpa_printf(MSG_DEBUG, "EAP-WSC: Invalid Message "
"Length");
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
}
@@ -477,7 +477,7 @@
if (op_code != WSC_FRAG_ACK) {
wpa_printf(MSG_DEBUG, "EAP-WSC: Unexpected Op-Code %d "
"in WAIT_FRAG_ACK state", op_code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_printf(MSG_DEBUG, "EAP-WSC: Fragment acknowledged");
@@ -489,7 +489,7 @@
op_code != WSC_Done && op_code != WSC_Start) {
wpa_printf(MSG_DEBUG, "EAP-WSC: Unexpected Op-Code %d",
op_code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
@@ -497,7 +497,7 @@
if (op_code != WSC_Start) {
wpa_printf(MSG_DEBUG, "EAP-WSC: Unexpected Op-Code %d "
"in WAIT_START state", op_code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
wpa_printf(MSG_DEBUG, "EAP-WSC: Received start");
@@ -507,13 +507,13 @@
} else if (op_code == WSC_Start) {
wpa_printf(MSG_DEBUG, "EAP-WSC: Unexpected Op-Code %d",
op_code);
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}
if (data->in_buf &&
eap_wsc_process_cont(data, pos, end - pos, op_code) < 0) {
- ret->ignore = TRUE;
+ ret->ignore = true;
return NULL;
}