]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP server: Convert Boolean to C99 bool
authorJouni Malinen <jouni@codeaurora.org>
Mon, 20 Apr 2020 21:16:16 +0000 (00:16 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 21 Apr 2020 14:39:07 +0000 (17:39 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
24 files changed:
src/eap_server/eap.h
src/eap_server/eap_i.h
src/eap_server/eap_server.c
src/eap_server/eap_server_aka.c
src/eap_server/eap_server_eke.c
src/eap_server/eap_server_fast.c
src/eap_server/eap_server_gpsk.c
src/eap_server/eap_server_gtc.c
src/eap_server/eap_server_identity.c
src/eap_server/eap_server_ikev2.c
src/eap_server/eap_server_md5.c
src/eap_server/eap_server_mschapv2.c
src/eap_server/eap_server_pax.c
src/eap_server/eap_server_peap.c
src/eap_server/eap_server_psk.c
src/eap_server/eap_server_pwd.c
src/eap_server/eap_server_sake.c
src/eap_server/eap_server_sim.c
src/eap_server/eap_server_teap.c
src/eap_server/eap_server_tls.c
src/eap_server/eap_server_tnc.c
src/eap_server/eap_server_ttls.c
src/eap_server/eap_server_vendor_test.c
src/eap_server/eap_server_wsc.c

index 540b4e70b287dc395c737aba2fe8ecb3ed426f43..61032cc016bcbd586f70699b6b883ee73d0dac9a 100644 (file)
@@ -45,43 +45,43 @@ struct eap_user {
 
 struct eap_eapol_interface {
        /* Lower layer to full authenticator variables */
-       Boolean eapResp; /* shared with EAPOL Backend Authentication */
+       bool eapResp; /* shared with EAPOL Backend Authentication */
        struct wpabuf *eapRespData;
-       Boolean portEnabled;
+       bool portEnabled;
        int retransWhile;
-       Boolean eapRestart; /* shared with EAPOL Authenticator PAE */
+       bool eapRestart; /* shared with EAPOL Authenticator PAE */
        int eapSRTT;
        int eapRTTVAR;
 
        /* Full authenticator to lower layer variables */
-       Boolean eapReq; /* shared with EAPOL Backend Authentication */
-       Boolean eapNoReq; /* shared with EAPOL Backend Authentication */
-       Boolean eapSuccess;
-       Boolean eapFail;
-       Boolean eapTimeout;
+       bool eapReq; /* shared with EAPOL Backend Authentication */
+       bool eapNoReq; /* shared with EAPOL Backend Authentication */
+       bool eapSuccess;
+       bool eapFail;
+       bool eapTimeout;
        struct wpabuf *eapReqData;
        u8 *eapKeyData;
        size_t eapKeyDataLen;
        u8 *eapSessionId;
        size_t eapSessionIdLen;
-       Boolean eapKeyAvailable; /* called keyAvailable in IEEE 802.1X-2004 */
+       bool eapKeyAvailable; /* called keyAvailable in IEEE 802.1X-2004 */
 
        /* AAA interface to full authenticator variables */
-       Boolean aaaEapReq;
-       Boolean aaaEapNoReq;
-       Boolean aaaSuccess;
-       Boolean aaaFail;
+       bool aaaEapReq;
+       bool aaaEapNoReq;
+       bool aaaSuccess;
+       bool aaaFail;
        struct wpabuf *aaaEapReqData;
        u8 *aaaEapKeyData;
        size_t aaaEapKeyDataLen;
-       Boolean aaaEapKeyAvailable;
+       bool aaaEapKeyAvailable;
        int aaaMethodTimeout;
 
        /* Full authenticator to AAA interface variables */
-       Boolean aaaEapResp;
+       bool aaaEapResp;
        struct wpabuf *aaaEapRespData;
        /* aaaIdentity -> eap_get_identity() */
-       Boolean aaaTimeout;
+       bool aaaTimeout;
 };
 
 struct eap_server_erp_key {
@@ -124,7 +124,7 @@ struct eap_config {
         * callback context.
         */
        void *eap_sim_db_priv;
-       Boolean backend_auth;
+       bool backend_auth;
        int eap_server;
 
        /**
index 44896a6958c04c0ef86d18bdd1d576f519b20709..28bb564e9331b160794f325c08f1948a8fd858d7 100644 (file)
@@ -32,15 +32,14 @@ struct eap_method {
 
        struct wpabuf * (*buildReq)(struct eap_sm *sm, void *priv, u8 id);
        int (*getTimeout)(struct eap_sm *sm, void *priv);
-       Boolean (*check)(struct eap_sm *sm, void *priv,
-                        struct wpabuf *respData);
+       bool (*check)(struct eap_sm *sm, void *priv, struct wpabuf *respData);
        void (*process)(struct eap_sm *sm, void *priv,
                        struct wpabuf *respData);
-       Boolean (*isDone)(struct eap_sm *sm, void *priv);
+       bool (*isDone)(struct eap_sm *sm, void *priv);
        u8 * (*getKey)(struct eap_sm *sm, void *priv, size_t *len);
        /* isSuccess is not specified in draft-ietf-eap-statemachine-05.txt,
         * but it is useful in implementing Policy.getDecision() */
-       Boolean (*isSuccess)(struct eap_sm *sm, void *priv);
+       bool (*isSuccess)(struct eap_sm *sm, void *priv);
 
        /**
         * free - Free EAP method data
@@ -138,13 +137,13 @@ struct eap_sm {
        int methodTimeout;
 
        /* Short-term (not maintained between packets) */
-       Boolean rxResp;
-       Boolean rxInitiate;
+       bool rxResp;
+       bool rxInitiate;
        int respId;
        enum eap_type respMethod;
        int respVendor;
        u32 respVendorMethod;
-       Boolean ignore;
+       bool ignore;
        enum {
                DECISION_SUCCESS, DECISION_FAILURE, DECISION_CONTINUE,
                DECISION_PASSTHROUGH, DECISION_INITIATE_REAUTH_START
@@ -153,7 +152,7 @@ struct eap_sm {
        /* Miscellaneous variables */
        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;
@@ -169,7 +168,7 @@ struct eap_sm {
        int init_phase2;
        const struct eap_config *cfg;
        struct eap_config cfg_buf;
-       Boolean update_user;
+       bool update_user;
 
        unsigned int num_rounds;
        unsigned int num_rounds_short;
@@ -183,12 +182,12 @@ struct eap_sm {
        struct wpabuf *assoc_wps_ie;
        struct wpabuf *assoc_p2p_ie;
 
-       Boolean start_reauth;
+       bool start_reauth;
 
        u8 peer_addr[ETH_ALEN];
 
-       Boolean initiate_reauth_start_sent;
-       Boolean try_initiate_reauth;
+       bool initiate_reauth_start_sent;
+       bool try_initiate_reauth;
 
 #ifdef CONFIG_TESTING_OPTIONS
        u32 tls_test_flags;
index 34ce23946bf56a06a59703258bba94d35df9461e..0b7a5b98cf3075f93e6fb4b045377bb8f535eeee 100644 (file)
@@ -9,7 +9,7 @@
  * in RFC 4137. However, to support backend authentication in RADIUS
  * authentication server functionality, parts of backend authenticator (also
  * from RFC 4137) are mixed in. This functionality is enabled by setting
- * backend_auth configuration variable to TRUE.
+ * backend_auth configuration variable to true.
  */
 
 #include "includes.h"
@@ -38,7 +38,7 @@ static void eap_sm_Policy_update(struct eap_sm *sm, const u8 *nak_list,
 static enum eap_type eap_sm_Policy_getNextMethod(struct eap_sm *sm,
                                                 int *vendor);
 static int eap_sm_Policy_getDecision(struct eap_sm *sm);
-static Boolean eap_sm_Policy_doPickUp(struct eap_sm *sm, enum eap_type method);
+static bool eap_sm_Policy_doPickUp(struct eap_sm *sm, enum eap_type method);
 
 
 static int eap_get_erp_send_reauth_start(struct eap_sm *sm)
@@ -230,19 +230,19 @@ SM_STATE(EAP, INITIALIZE)
                eap_server_clear_identity(sm);
        }
 
-       sm->try_initiate_reauth = FALSE;
+       sm->try_initiate_reauth = false;
        sm->currentId = -1;
-       sm->eap_if.eapSuccess = FALSE;
-       sm->eap_if.eapFail = FALSE;
-       sm->eap_if.eapTimeout = FALSE;
+       sm->eap_if.eapSuccess = false;
+       sm->eap_if.eapFail = false;
+       sm->eap_if.eapTimeout = false;
        bin_clear_free(sm->eap_if.eapKeyData, sm->eap_if.eapKeyDataLen);
        sm->eap_if.eapKeyData = NULL;
        sm->eap_if.eapKeyDataLen = 0;
        os_free(sm->eap_if.eapSessionId);
        sm->eap_if.eapSessionId = NULL;
        sm->eap_if.eapSessionIdLen = 0;
-       sm->eap_if.eapKeyAvailable = FALSE;
-       sm->eap_if.eapRestart = FALSE;
+       sm->eap_if.eapKeyAvailable = false;
+       sm->eap_if.eapRestart = false;
 
        /*
         * This is not defined in RFC 4137, but method state needs to be
@@ -322,7 +322,7 @@ SM_STATE(EAP, RETRANSMIT)
        sm->retransCount++;
        if (sm->retransCount <= sm->MaxRetrans && sm->lastReqData) {
                if (eap_copy_buf(&sm->eap_if.eapReqData, sm->lastReqData) == 0)
-                       sm->eap_if.eapReq = TRUE;
+                       sm->eap_if.eapReq = true;
        }
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_RETRANSMIT MACSTR,
@@ -347,8 +347,8 @@ SM_STATE(EAP, RECEIVED)
 SM_STATE(EAP, DISCARD)
 {
        SM_ENTRY(EAP, DISCARD);
-       sm->eap_if.eapResp = FALSE;
-       sm->eap_if.eapNoReq = TRUE;
+       sm->eap_if.eapResp = false;
+       sm->eap_if.eapNoReq = true;
 }
 
 
@@ -362,17 +362,17 @@ SM_STATE(EAP, SEND_REQUEST)
                        sm->num_rounds_short = 0;
                if (eap_copy_buf(&sm->lastReqData, sm->eap_if.eapReqData) == 0)
                {
-                       sm->eap_if.eapResp = FALSE;
-                       sm->eap_if.eapReq = TRUE;
+                       sm->eap_if.eapResp = false;
+                       sm->eap_if.eapReq = true;
                } else {
-                       sm->eap_if.eapResp = FALSE;
-                       sm->eap_if.eapReq = FALSE;
+                       sm->eap_if.eapResp = false;
+                       sm->eap_if.eapReq = false;
                }
        } else {
                wpa_printf(MSG_INFO, "EAP: SEND_REQUEST - no eapReqData");
-               sm->eap_if.eapResp = FALSE;
-               sm->eap_if.eapReq = FALSE;
-               sm->eap_if.eapNoReq = TRUE;
+               sm->eap_if.eapResp = false;
+               sm->eap_if.eapReq = false;
+               sm->eap_if.eapNoReq = true;
        }
 }
 
@@ -382,7 +382,7 @@ SM_STATE(EAP, INTEGRITY_CHECK)
        SM_ENTRY(EAP, INTEGRITY_CHECK);
 
        if (!eap_hdr_len_valid(sm->eap_if.eapRespData, 1)) {
-               sm->ignore = TRUE;
+               sm->ignore = true;
                return;
        }
 
@@ -552,7 +552,7 @@ SM_STATE(EAP, PROPOSE_METHOD)
 
        SM_ENTRY(EAP, PROPOSE_METHOD);
 
-       sm->try_initiate_reauth = FALSE;
+       sm->try_initiate_reauth = false;
 try_another_method:
        type = eap_sm_Policy_getNextMethod(sm, &vendor);
        if (vendor == EAP_VENDOR_IETF)
@@ -640,7 +640,7 @@ SM_STATE(EAP, TIMEOUT_FAILURE)
 {
        SM_ENTRY(EAP, TIMEOUT_FAILURE);
 
-       sm->eap_if.eapTimeout = TRUE;
+       sm->eap_if.eapTimeout = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO,
                WPA_EVENT_EAP_TIMEOUT_FAILURE MACSTR, MAC2STR(sm->peer_addr));
@@ -655,7 +655,7 @@ SM_STATE(EAP, FAILURE)
        sm->eap_if.eapReqData = eap_sm_buildFailure(sm, sm->currentId);
        wpabuf_free(sm->lastReqData);
        sm->lastReqData = NULL;
-       sm->eap_if.eapFail = TRUE;
+       sm->eap_if.eapFail = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_FAILURE
                MACSTR, MAC2STR(sm->peer_addr));
@@ -671,8 +671,8 @@ SM_STATE(EAP, SUCCESS)
        wpabuf_free(sm->lastReqData);
        sm->lastReqData = NULL;
        if (sm->eap_if.eapKeyData)
-               sm->eap_if.eapKeyAvailable = TRUE;
-       sm->eap_if.eapSuccess = TRUE;
+               sm->eap_if.eapKeyAvailable = true;
+       sm->eap_if.eapSuccess = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS
                MACSTR, MAC2STR(sm->peer_addr));
@@ -683,8 +683,8 @@ SM_STATE(EAP, INITIATE_REAUTH_START)
 {
        SM_ENTRY(EAP, INITIATE_REAUTH_START);
 
-       sm->initiate_reauth_start_sent = TRUE;
-       sm->try_initiate_reauth = TRUE;
+       sm->initiate_reauth_start_sent = true;
+       sm->try_initiate_reauth = true;
        sm->currentId = eap_sm_nextId(sm, sm->currentId);
        wpa_printf(MSG_DEBUG,
                   "EAP: building EAP-Initiate-Re-auth-Start: Identifier %d",
@@ -760,7 +760,7 @@ static void erp_send_finish_reauth(struct eap_sm *sm,
        sm->lastReqData = NULL;
 
        if ((flags & 0x80) || !erp) {
-               sm->eap_if.eapFail = TRUE;
+               sm->eap_if.eapFail = true;
                wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_FAILURE
                        MACSTR, MAC2STR(sm->peer_addr));
                return;
@@ -784,10 +784,10 @@ static void erp_send_finish_reauth(struct eap_sm *sm,
                return;
        }
        sm->eap_if.eapKeyDataLen = erp->rRK_len;
-       sm->eap_if.eapKeyAvailable = TRUE;
+       sm->eap_if.eapKeyAvailable = true;
        wpa_hexdump_key(MSG_DEBUG, "EAP: ERP rMSK",
                        sm->eap_if.eapKeyData, sm->eap_if.eapKeyDataLen);
-       sm->eap_if.eapSuccess = TRUE;
+       sm->eap_if.eapSuccess = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS
                MACSTR, MAC2STR(sm->peer_addr));
@@ -811,7 +811,7 @@ SM_STATE(EAP, INITIATE_RECEIVED)
 
        SM_ENTRY(EAP, INITIATE_RECEIVED);
 
-       sm->rxInitiate = FALSE;
+       sm->rxInitiate = false;
 
        pos = eap_hdr_validate(EAP_VENDOR_IETF,
                               (enum eap_type) EAP_ERP_TYPE_REAUTH,
@@ -988,7 +988,7 @@ report_error:
        return;
 
 fail:
-       sm->ignore = TRUE;
+       sm->ignore = true;
 }
 
 #endif /* CONFIG_ERP */
@@ -1000,7 +1000,7 @@ SM_STATE(EAP, INITIALIZE_PASSTHROUGH)
 
        wpabuf_free(sm->eap_if.aaaEapRespData);
        sm->eap_if.aaaEapRespData = NULL;
-       sm->try_initiate_reauth = FALSE;
+       sm->try_initiate_reauth = false;
 }
 
 
@@ -1021,7 +1021,7 @@ SM_STATE(EAP, RETRANSMIT2)
        sm->retransCount++;
        if (sm->retransCount <= sm->MaxRetrans && sm->lastReqData) {
                if (eap_copy_buf(&sm->eap_if.eapReqData, sm->lastReqData) == 0)
-                       sm->eap_if.eapReq = TRUE;
+                       sm->eap_if.eapReq = true;
        }
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_RETRANSMIT2 MACSTR,
@@ -1041,8 +1041,8 @@ SM_STATE(EAP, RECEIVED2)
 SM_STATE(EAP, DISCARD2)
 {
        SM_ENTRY(EAP, DISCARD2);
-       sm->eap_if.eapResp = FALSE;
-       sm->eap_if.eapNoReq = TRUE;
+       sm->eap_if.eapResp = false;
+       sm->eap_if.eapNoReq = true;
 }
 
 
@@ -1054,17 +1054,17 @@ SM_STATE(EAP, SEND_REQUEST2)
        if (sm->eap_if.eapReqData) {
                if (eap_copy_buf(&sm->lastReqData, sm->eap_if.eapReqData) == 0)
                {
-                       sm->eap_if.eapResp = FALSE;
-                       sm->eap_if.eapReq = TRUE;
+                       sm->eap_if.eapResp = false;
+                       sm->eap_if.eapReq = true;
                } else {
-                       sm->eap_if.eapResp = FALSE;
-                       sm->eap_if.eapReq = FALSE;
+                       sm->eap_if.eapResp = false;
+                       sm->eap_if.eapReq = false;
                }
        } else {
                wpa_printf(MSG_INFO, "EAP: SEND_REQUEST2 - no eapReqData");
-               sm->eap_if.eapResp = FALSE;
-               sm->eap_if.eapReq = FALSE;
-               sm->eap_if.eapNoReq = TRUE;
+               sm->eap_if.eapResp = false;
+               sm->eap_if.eapReq = false;
+               sm->eap_if.eapNoReq = true;
        }
 }
 
@@ -1103,11 +1103,11 @@ SM_STATE(EAP, AAA_IDLE)
 {
        SM_ENTRY(EAP, AAA_IDLE);
 
-       sm->eap_if.aaaFail = FALSE;
-       sm->eap_if.aaaSuccess = FALSE;
-       sm->eap_if.aaaEapReq = FALSE;
-       sm->eap_if.aaaEapNoReq = FALSE;
-       sm->eap_if.aaaEapResp = TRUE;
+       sm->eap_if.aaaFail = false;
+       sm->eap_if.aaaSuccess = false;
+       sm->eap_if.aaaEapReq = false;
+       sm->eap_if.aaaEapNoReq = false;
+       sm->eap_if.aaaEapResp = true;
 }
 
 
@@ -1115,7 +1115,7 @@ SM_STATE(EAP, TIMEOUT_FAILURE2)
 {
        SM_ENTRY(EAP, TIMEOUT_FAILURE2);
 
-       sm->eap_if.eapTimeout = TRUE;
+       sm->eap_if.eapTimeout = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO,
                WPA_EVENT_EAP_TIMEOUT_FAILURE2 MACSTR, MAC2STR(sm->peer_addr));
@@ -1127,7 +1127,7 @@ SM_STATE(EAP, FAILURE2)
        SM_ENTRY(EAP, FAILURE2);
 
        eap_copy_buf(&sm->eap_if.eapReqData, sm->eap_if.aaaEapReqData);
-       sm->eap_if.eapFail = TRUE;
+       sm->eap_if.eapFail = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_FAILURE2 MACSTR,
                MAC2STR(sm->peer_addr));
@@ -1149,14 +1149,14 @@ SM_STATE(EAP, SUCCESS2)
                sm->eap_if.eapKeyDataLen = 0;
        }
 
-       sm->eap_if.eapSuccess = TRUE;
+       sm->eap_if.eapSuccess = true;
 
        /*
         * Start reauthentication with identity request even though we know the
         * previously used identity. This is needed to get reauthentication
         * started properly.
         */
-       sm->start_reauth = TRUE;
+       sm->start_reauth = true;
 
        wpa_msg(sm->cfg->msg_ctx, MSG_INFO, WPA_EVENT_EAP_SUCCESS2 MACSTR,
                MAC2STR(sm->peer_addr));
@@ -1217,7 +1217,7 @@ SM_STEP(EAP)
        case EAP_IDLE:
                if (sm->eap_if.retransWhile == 0) {
                        if (sm->try_initiate_reauth) {
-                               sm->try_initiate_reauth = FALSE;
+                               sm->try_initiate_reauth = false;
                                SM_ENTER(EAP, SELECT_ACTION);
                        } else {
                                SM_ENTER(EAP, RETRANSMIT);
@@ -1491,8 +1491,8 @@ static void eap_sm_parseEapResp(struct eap_sm *sm, const struct wpabuf *resp)
        size_t plen;
 
        /* parse rxResp, respId, respMethod */
-       sm->rxResp = FALSE;
-       sm->rxInitiate = FALSE;
+       sm->rxResp = false;
+       sm->rxInitiate = false;
        sm->respId = -1;
        sm->respMethod = EAP_TYPE_NONE;
        sm->respVendor = EAP_VENDOR_IETF;
@@ -1518,9 +1518,9 @@ static void eap_sm_parseEapResp(struct eap_sm *sm, const struct wpabuf *resp)
        sm->respId = hdr->identifier;
 
        if (hdr->code == EAP_CODE_RESPONSE)
-               sm->rxResp = TRUE;
+               sm->rxResp = true;
        else if (hdr->code == EAP_CODE_INITIATE)
-               sm->rxInitiate = TRUE;
+               sm->rxInitiate = true;
 
        if (plen > sizeof(*hdr)) {
                u8 *pos = (u8 *) (hdr + 1);
@@ -1702,7 +1702,7 @@ static enum eap_type eap_sm_Policy_getNextMethod(struct eap_sm *sm, int *vendor)
        if (sm->identity == NULL || sm->currentId == -1) {
                *vendor = EAP_VENDOR_IETF;
                next = EAP_TYPE_IDENTITY;
-               sm->update_user = TRUE;
+               sm->update_user = true;
        } else if (sm->user && idx < EAP_MAX_METHODS &&
                   (sm->user->methods[idx].vendor != EAP_VENDOR_IETF ||
                    sm->user->methods[idx].method != EAP_TYPE_NONE)) {
@@ -1730,7 +1730,7 @@ static int eap_sm_Policy_getDecision(struct eap_sm *sm)
            sm->m->isSuccess(sm, sm->eap_method_priv)) {
                wpa_printf(MSG_DEBUG, "EAP: getDecision: method succeeded -> "
                           "SUCCESS");
-               sm->update_user = TRUE;
+               sm->update_user = true;
                return DECISION_SUCCESS;
        }
 
@@ -1738,7 +1738,7 @@ static int eap_sm_Policy_getDecision(struct eap_sm *sm)
            !sm->m->isSuccess(sm, sm->eap_method_priv)) {
                wpa_printf(MSG_DEBUG, "EAP: getDecision: method failed -> "
                           "FAILURE");
-               sm->update_user = TRUE;
+               sm->update_user = true;
                return DECISION_FAILURE;
        }
 
@@ -1765,12 +1765,12 @@ static int eap_sm_Policy_getDecision(struct eap_sm *sm)
                    sm->user->methods[0].method == EAP_TYPE_IDENTITY) {
                        wpa_printf(MSG_DEBUG, "EAP: getDecision: stop "
                                   "identity request loop -> FAILURE");
-                       sm->update_user = TRUE;
+                       sm->update_user = true;
                        return DECISION_FAILURE;
                }
-               sm->update_user = FALSE;
+               sm->update_user = false;
        }
-       sm->start_reauth = FALSE;
+       sm->start_reauth = false;
 
        if (sm->user && sm->user_eap_method_index < EAP_MAX_METHODS &&
            (sm->user->methods[sm->user_eap_method_index].vendor !=
@@ -1801,9 +1801,9 @@ static int eap_sm_Policy_getDecision(struct eap_sm *sm)
 }
 
 
-static Boolean eap_sm_Policy_doPickUp(struct eap_sm *sm, enum eap_type method)
+static bool eap_sm_Policy_doPickUp(struct eap_sm *sm, enum eap_type method)
 {
-       return method == EAP_TYPE_IDENTITY ? TRUE : FALSE;
+       return method == EAP_TYPE_IDENTITY;
 }
 
 
@@ -1820,7 +1820,7 @@ int eap_server_sm_step(struct eap_sm *sm)
 {
        int res = 0;
        do {
-               sm->changed = FALSE;
+               sm->changed = false;
                SM_STEP_RUN(EAP);
                if (sm->changed)
                        res = 1;
index 22dd965d68115a91866aaa35eeb834b21474a4e5..e9bf0300c16f967b255f84d40ae2307312ff31cb 100644 (file)
@@ -664,8 +664,8 @@ static struct wpabuf * eap_aka_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_aka_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_aka_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_aka_data *data = priv;
        const u8 *pos;
@@ -675,25 +675,25 @@ static Boolean eap_aka_check(struct eap_sm *sm, void *priv,
                               &len);
        if (pos == NULL || len < 3) {
                wpa_printf(MSG_INFO, "EAP-AKA: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
-static Boolean eap_aka_subtype_ok(struct eap_aka_data *data, u8 subtype)
+static bool eap_aka_subtype_ok(struct eap_aka_data *data, u8 subtype)
 {
        if (subtype == EAP_AKA_SUBTYPE_CLIENT_ERROR ||
            subtype == EAP_AKA_SUBTYPE_AUTHENTICATION_REJECT)
-               return FALSE;
+               return false;
 
        switch (data->state) {
        case IDENTITY:
                if (subtype != EAP_AKA_SUBTYPE_IDENTITY) {
                        wpa_printf(MSG_INFO, "EAP-AKA: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        case CHALLENGE:
@@ -701,30 +701,30 @@ static Boolean eap_aka_subtype_ok(struct eap_aka_data *data, u8 subtype)
                    subtype != EAP_AKA_SUBTYPE_SYNCHRONIZATION_FAILURE) {
                        wpa_printf(MSG_INFO, "EAP-AKA: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        case REAUTH:
                if (subtype != EAP_AKA_SUBTYPE_REAUTHENTICATION) {
                        wpa_printf(MSG_INFO, "EAP-AKA: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        case NOTIFICATION:
                if (subtype != EAP_AKA_SUBTYPE_NOTIFICATION) {
                        wpa_printf(MSG_INFO, "EAP-AKA: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        default:
                wpa_printf(MSG_INFO, "EAP-AKA: Unexpected state (%d) for "
                           "processing a response", data->state);
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -1269,7 +1269,7 @@ static void eap_aka_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_aka_isDone(struct eap_sm *sm, void *priv)
+static bool eap_aka_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_aka_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -1308,7 +1308,7 @@ static u8 * eap_aka_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_aka_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_aka_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_aka_data *data = priv;
        return data->state == SUCCESS;
index 71fab96246403cbc1b9448c1cf345a9b21e08154..eac3245cd1f296da81b8d77d142411a4c6cd95b5 100644 (file)
@@ -380,8 +380,8 @@ static struct wpabuf * eap_eke_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_eke_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_eke_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_eke_data *data = priv;
        size_t len;
@@ -391,28 +391,28 @@ static Boolean eap_eke_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_EKE, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-EKE: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        eke_exch = *pos;
        wpa_printf(MSG_DEBUG, "EAP-EKE: Received frame: EKE-Exch=%d", eke_exch);
 
        if (data->state == IDENTITY && eke_exch == EAP_EKE_ID)
-               return FALSE;
+               return false;
 
        if (data->state == COMMIT && eke_exch == EAP_EKE_COMMIT)
-               return FALSE;
+               return false;
 
        if (data->state == CONFIRM && eke_exch == EAP_EKE_CONFIRM)
-               return FALSE;
+               return false;
 
        if (eke_exch == EAP_EKE_FAILURE)
-               return FALSE;
+               return false;
 
        wpa_printf(MSG_INFO, "EAP-EKE: Unexpected EKE-Exch=%d in state=%d",
                   eke_exch, data->state);
 
-       return TRUE;
+       return true;
 }
 
 
@@ -716,7 +716,7 @@ static void eap_eke_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_eke_isDone(struct eap_sm *sm, void *priv)
+static bool eap_eke_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_eke_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -757,7 +757,7 @@ static u8 * eap_eke_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_eke_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_eke_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_eke_data *data = priv;
        return data->state == SUCCESS;
index 0270821ccd1cdd3260ea0a3834c6ebbe6987be9f..55d48d91f6069c191b2bca8cf1c47b5804a1a5d5 100644 (file)
@@ -929,8 +929,8 @@ static struct wpabuf * eap_fast_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_fast_check(struct eap_sm *sm, void *priv,
-                             struct wpabuf *respData)
+static bool eap_fast_check(struct eap_sm *sm, void *priv,
+                          struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -938,10 +938,10 @@ static Boolean eap_fast_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_FAST, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-FAST: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -1563,7 +1563,7 @@ static void eap_fast_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_fast_isDone(struct eap_sm *sm, void *priv)
+static bool eap_fast_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_fast_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -1614,7 +1614,7 @@ static u8 * eap_fast_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_fast_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_fast_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_fast_data *data = priv;
        return data->state == SUCCESS;
index a7742751a2c328790155ba87cf61ddd9d0a7b2bc..4081b9f99c19186a78e8381b22bce26265a2832f 100644 (file)
@@ -208,8 +208,8 @@ static struct wpabuf * eap_gpsk_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_gpsk_check(struct eap_sm *sm, void *priv,
-                             struct wpabuf *respData)
+static bool eap_gpsk_check(struct eap_sm *sm, void *priv,
+                          struct wpabuf *respData)
 {
        struct eap_gpsk_data *data = priv;
        const u8 *pos;
@@ -218,21 +218,21 @@ static Boolean eap_gpsk_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_GPSK, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-GPSK: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        wpa_printf(MSG_DEBUG, "EAP-GPSK: Received frame: opcode=%d", *pos);
 
        if (data->state == GPSK_1 && *pos == EAP_GPSK_OPCODE_GPSK_2)
-               return FALSE;
+               return false;
 
        if (data->state == GPSK_3 && *pos == EAP_GPSK_OPCODE_GPSK_4)
-               return FALSE;
+               return false;
 
        wpa_printf(MSG_INFO, "EAP-GPSK: Unexpected opcode=%d in state=%d",
                   *pos, data->state);
 
-       return TRUE;
+       return true;
 }
 
 
@@ -560,7 +560,7 @@ static void eap_gpsk_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_gpsk_isDone(struct eap_sm *sm, void *priv)
+static bool eap_gpsk_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_gpsk_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -601,7 +601,7 @@ static u8 * eap_gpsk_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_gpsk_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_gpsk_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_gpsk_data *data = priv;
        return data->state == SUCCESS;
index fcccbcbd5efa73dfe23bc6faa4933332db3886b7..6310793a7d6ac333768c27d58ba3ab29a67ede62 100644 (file)
@@ -74,8 +74,8 @@ static struct wpabuf * eap_gtc_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_gtc_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_gtc_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -83,10 +83,10 @@ static Boolean eap_gtc_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_GTC, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-GTC: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -184,14 +184,14 @@ static void eap_gtc_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_gtc_isDone(struct eap_sm *sm, void *priv)
+static bool eap_gtc_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_gtc_data *data = priv;
        return data->state != CONTINUE;
 }
 
 
-static Boolean eap_gtc_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_gtc_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_gtc_data *data = priv;
        return data->state == SUCCESS;
index 1b1db53f25b20a131aefd36caa74cac88bd1b65a..813e1d6de51d0e4c6e0f64e7cec2f2c32393386f 100644 (file)
@@ -79,8 +79,8 @@ static struct wpabuf * eap_identity_buildReq(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_identity_check(struct eap_sm *sm, void *priv,
-                                 struct wpabuf *respData)
+static bool eap_identity_check(struct eap_sm *sm, void *priv,
+                              struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -89,10 +89,10 @@ static Boolean eap_identity_check(struct eap_sm *sm, void *priv,
                               respData, &len);
        if (pos == NULL) {
                wpa_printf(MSG_INFO, "EAP-Identity: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -127,7 +127,7 @@ static void eap_identity_process(struct eap_sm *sm, void *priv,
                os_free(buf);
        }
        if (sm->identity)
-               sm->update_user = TRUE;
+               sm->update_user = true;
        os_free(sm->identity);
        sm->identity = os_malloc(len ? len : 1);
        if (sm->identity == NULL) {
@@ -140,14 +140,14 @@ static void eap_identity_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_identity_isDone(struct eap_sm *sm, void *priv)
+static bool eap_identity_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_identity_data *data = priv;
        return data->state != CONTINUE;
 }
 
 
-static Boolean eap_identity_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_identity_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_identity_data *data = priv;
        return data->state == SUCCESS;
index 897637e8e681163dc1ca34a43db2abced70fbc7a..ef3cc8cccebfe5dcb5a1f1a6e652f7fb0fae03f8 100644 (file)
@@ -236,8 +236,8 @@ static struct wpabuf * eap_ikev2_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_ikev2_check(struct eap_sm *sm, void *priv,
-                              struct wpabuf *respData)
+static bool eap_ikev2_check(struct eap_sm *sm, void *priv,
+                           struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -246,10 +246,10 @@ static Boolean eap_ikev2_check(struct eap_sm *sm, void *priv,
                               &len);
        if (pos == NULL) {
                wpa_printf(MSG_INFO, "EAP-IKEV2: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -465,14 +465,14 @@ static void eap_ikev2_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_ikev2_isDone(struct eap_sm *sm, void *priv)
+static bool eap_ikev2_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_ikev2_data *data = priv;
        return data->state == DONE || data->state == FAIL;
 }
 
 
-static Boolean eap_ikev2_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_ikev2_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_ikev2_data *data = priv;
        return data->state == DONE && data->ikev2.state == IKEV2_DONE &&
index cf5ceb1d15298f97c571842b10f03366f0f30dbb..c9b500cdb1a59cfd7926e114d5867d8caa642388 100644 (file)
@@ -73,8 +73,8 @@ static struct wpabuf * eap_md5_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_md5_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_md5_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -82,16 +82,16 @@ static Boolean eap_md5_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_MD5, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-MD5: Invalid frame");
-               return TRUE;
+               return true;
        }
        if (*pos != CHAP_MD5_LEN || 1 + CHAP_MD5_LEN > len) {
                wpa_printf(MSG_INFO, "EAP-MD5: Invalid response "
                           "(response_len=%d payload_len=%lu",
                           *pos, (unsigned long) len);
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -136,14 +136,14 @@ static void eap_md5_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_md5_isDone(struct eap_sm *sm, void *priv)
+static bool eap_md5_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_md5_data *data = priv;
        return data->state != CONTINUE;
 }
 
 
-static Boolean eap_md5_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_md5_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_md5_data *data = priv;
        return data->state == SUCCESS;
index 8a1621affa85c6f3b1a7db83fdde8db864ad81fe..9b3eb26ef4532bdf57ba945a554e7c07009442ae 100644 (file)
@@ -235,8 +235,8 @@ static struct wpabuf * eap_mschapv2_buildReq(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_mschapv2_check(struct eap_sm *sm, void *priv,
-                                 struct wpabuf *respData)
+static bool eap_mschapv2_check(struct eap_sm *sm, void *priv,
+                              struct wpabuf *respData)
 {
        struct eap_mschapv2_data *data = priv;
        struct eap_mschapv2_hdr *resp;
@@ -247,7 +247,7 @@ static Boolean eap_mschapv2_check(struct eap_sm *sm, void *priv,
                               &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-MSCHAPV2: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        resp = (struct eap_mschapv2_hdr *) pos;
@@ -255,7 +255,7 @@ static Boolean eap_mschapv2_check(struct eap_sm *sm, void *priv,
            resp->op_code != MSCHAPV2_OP_RESPONSE) {
                wpa_printf(MSG_DEBUG, "EAP-MSCHAPV2: Expected Response - "
                           "ignore op %d", resp->op_code);
-               return TRUE;
+               return true;
        }
 
        if (data->state == SUCCESS_REQ &&
@@ -263,17 +263,17 @@ static Boolean eap_mschapv2_check(struct eap_sm *sm, void *priv,
            resp->op_code != MSCHAPV2_OP_FAILURE) {
                wpa_printf(MSG_DEBUG, "EAP-MSCHAPV2: Expected Success or "
                           "Failure - ignore op %d", resp->op_code);
-               return TRUE;
+               return true;
        }
 
        if (data->state == FAILURE_REQ &&
            resp->op_code != MSCHAPV2_OP_FAILURE) {
                wpa_printf(MSG_DEBUG, "EAP-MSCHAPV2: Expected Failure "
                           "- ignore op %d", resp->op_code);
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -531,7 +531,7 @@ static void eap_mschapv2_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_mschapv2_isDone(struct eap_sm *sm, void *priv)
+static bool eap_mschapv2_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_mschapv2_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -564,7 +564,7 @@ static u8 * eap_mschapv2_getKey(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_mschapv2_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_mschapv2_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_mschapv2_data *data = priv;
        return data->state == SUCCESS;
index 5ed29efd1d3cbbda07f78baf7475f23a69bf736e..fb089d50a141d7b7a751f5cdf006fad86f5db46f 100644 (file)
@@ -195,8 +195,8 @@ static struct wpabuf * eap_pax_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_pax_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_pax_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_pax_data *data = priv;
        struct eap_pax_hdr *resp;
@@ -207,7 +207,7 @@ static Boolean eap_pax_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PAX, respData, &len);
        if (pos == NULL || len < sizeof(*resp) + EAP_PAX_ICV_LEN) {
                wpa_printf(MSG_INFO, "EAP-PAX: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        mlen = sizeof(struct eap_hdr) + 1 + len;
@@ -225,14 +225,14 @@ static Boolean eap_pax_check(struct eap_sm *sm, void *priv,
            resp->op_code != EAP_PAX_OP_STD_2) {
                wpa_printf(MSG_DEBUG, "EAP-PAX: Expected PAX_STD-2 - "
                           "ignore op %d", resp->op_code);
-               return TRUE;
+               return true;
        }
 
        if (data->state == PAX_STD_3 &&
            resp->op_code != EAP_PAX_OP_ACK) {
                wpa_printf(MSG_DEBUG, "EAP-PAX: Expected PAX-ACK - "
                           "ignore op %d", resp->op_code);
-               return TRUE;
+               return true;
        }
 
        if (resp->op_code != EAP_PAX_OP_STD_2 &&
@@ -244,38 +244,38 @@ static Boolean eap_pax_check(struct eap_sm *sm, void *priv,
        if (data->mac_id != resp->mac_id) {
                wpa_printf(MSG_DEBUG, "EAP-PAX: Expected MAC ID 0x%x, "
                           "received 0x%x", data->mac_id, resp->mac_id);
-               return TRUE;
+               return true;
        }
 
        if (resp->dh_group_id != EAP_PAX_DH_GROUP_NONE) {
                wpa_printf(MSG_INFO, "EAP-PAX: Expected DH Group ID 0x%x, "
                           "received 0x%x", EAP_PAX_DH_GROUP_NONE,
                           resp->dh_group_id);
-               return TRUE;
+               return true;
        }
 
        if (resp->public_key_id != EAP_PAX_PUBLIC_KEY_NONE) {
                wpa_printf(MSG_INFO, "EAP-PAX: Expected Public Key ID 0x%x, "
                           "received 0x%x", EAP_PAX_PUBLIC_KEY_NONE,
                           resp->public_key_id);
-               return TRUE;
+               return true;
        }
 
        if (resp->flags & EAP_PAX_FLAGS_MF) {
                /* TODO: add support for reassembling fragments */
                wpa_printf(MSG_INFO, "EAP-PAX: fragmentation not supported");
-               return TRUE;
+               return true;
        }
 
        if (resp->flags & EAP_PAX_FLAGS_CE) {
                wpa_printf(MSG_INFO, "EAP-PAX: Unexpected CE flag");
-               return TRUE;
+               return true;
        }
 
        if (data->keys_set) {
                if (len - sizeof(*resp) < EAP_PAX_ICV_LEN) {
                        wpa_printf(MSG_INFO, "EAP-PAX: No ICV in the packet");
-                       return TRUE;
+                       return true;
                }
                icv = wpabuf_mhead_u8(respData) + mlen - EAP_PAX_ICV_LEN;
                wpa_hexdump(MSG_MSGDUMP, "EAP-PAX: ICV", icv, EAP_PAX_ICV_LEN);
@@ -285,18 +285,18 @@ static Boolean eap_pax_check(struct eap_sm *sm, void *priv,
                                NULL, 0, NULL, 0, icvbuf) < 0) {
                        wpa_printf(MSG_INFO,
                                   "EAP-PAX: Failed to calculate ICV");
-                       return TRUE;
+                       return true;
                }
 
                if (os_memcmp_const(icvbuf, icv, EAP_PAX_ICV_LEN) != 0) {
                        wpa_printf(MSG_INFO, "EAP-PAX: Invalid ICV");
                        wpa_hexdump(MSG_MSGDUMP, "EAP-PAX: Expected ICV",
                                    icvbuf, EAP_PAX_ICV_LEN);
-                       return TRUE;
+                       return true;
                }
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -513,7 +513,7 @@ static void eap_pax_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_pax_isDone(struct eap_sm *sm, void *priv)
+static bool eap_pax_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_pax_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -563,7 +563,7 @@ static u8 * eap_pax_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_pax_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_pax_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_pax_data *data = priv;
        return data->state == SUCCESS;
index 02d8b8e88146a1d362067d7485f4ce939d541e39..f234f6fa534f83dd77cf71bd7696f77c3e18d955 100644 (file)
@@ -569,8 +569,8 @@ static struct wpabuf * eap_peap_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_peap_check(struct eap_sm *sm, void *priv,
-                             struct wpabuf *respData)
+static bool eap_peap_check(struct eap_sm *sm, void *priv,
+                          struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -578,10 +578,10 @@ static Boolean eap_peap_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PEAP, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-PEAP: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -1289,7 +1289,7 @@ static void eap_peap_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_peap_isDone(struct eap_sm *sm, void *priv)
+static bool eap_peap_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_peap_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -1383,7 +1383,7 @@ static u8 * eap_peap_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_peap_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_peap_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_peap_data *data = priv;
        return data->state == SUCCESS;
index 511973c94935a0bdced9f05e1a7755ed36e70ab7..f55f70dd849358f424ce215357a96e332b48962b 100644 (file)
@@ -171,8 +171,8 @@ static struct wpabuf * eap_psk_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_psk_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_psk_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_psk_data *data = priv;
        size_t len;
@@ -182,7 +182,7 @@ static Boolean eap_psk_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PSK, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-PSK: Invalid frame");
-               return TRUE;
+               return true;
        }
        t = EAP_PSK_FLAGS_GET_T(*pos);
 
@@ -191,22 +191,22 @@ static Boolean eap_psk_check(struct eap_sm *sm, void *priv,
        if (data->state == PSK_1 && t != 1) {
                wpa_printf(MSG_DEBUG, "EAP-PSK: Expected PSK-2 - "
                           "ignore T=%d", t);
-               return TRUE;
+               return true;
        }
 
        if (data->state == PSK_3 && t != 3) {
                wpa_printf(MSG_DEBUG, "EAP-PSK: Expected PSK-4 - "
                           "ignore T=%d", t);
-               return TRUE;
+               return true;
        }
 
        if ((t == 1 && len < sizeof(struct eap_psk_hdr_2)) ||
            (t == 3 && len < sizeof(struct eap_psk_hdr_4))) {
                wpa_printf(MSG_DEBUG, "EAP-PSK: Too short frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -433,7 +433,7 @@ static void eap_psk_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_psk_isDone(struct eap_sm *sm, void *priv)
+static bool eap_psk_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_psk_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -474,7 +474,7 @@ static u8 * eap_psk_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_psk_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_psk_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_psk_data *data = priv;
        return data->state == SUCCESS;
index 6bf3a23d035d90ec8dfaa55900938a6e89af38cb..81cddca607f5f7683ddb57ab29e1c34aaf04d0ed 100644 (file)
@@ -530,8 +530,8 @@ eap_pwd_build_req(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_pwd_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_pwd_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_pwd_data *data = priv;
        const u8 *pos;
@@ -540,7 +540,7 @@ static Boolean eap_pwd_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PWD, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-pwd: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        wpa_printf(MSG_DEBUG, "EAP-pwd: Received frame: exch = %d, len = %d",
@@ -548,20 +548,20 @@ static Boolean eap_pwd_check(struct eap_sm *sm, void *priv,
 
        if (data->state == PWD_ID_Req &&
            ((EAP_PWD_GET_EXCHANGE(*pos)) == EAP_PWD_OPCODE_ID_EXCH))
-               return FALSE;
+               return false;
 
        if (data->state == PWD_Commit_Req &&
            ((EAP_PWD_GET_EXCHANGE(*pos)) == EAP_PWD_OPCODE_COMMIT_EXCH))
-               return FALSE;
+               return false;
 
        if (data->state == PWD_Confirm_Req &&
            ((EAP_PWD_GET_EXCHANGE(*pos)) == EAP_PWD_OPCODE_CONFIRM_EXCH))
-               return FALSE;
+               return false;
 
        wpa_printf(MSG_INFO, "EAP-pwd: Unexpected opcode=%d in state=%d",
                   *pos, data->state);
 
-       return TRUE;
+       return true;
 }
 
 
@@ -1003,14 +1003,14 @@ static u8 * eap_pwd_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_pwd_is_success(struct eap_sm *sm, void *priv)
+static bool eap_pwd_is_success(struct eap_sm *sm, void *priv)
 {
        struct eap_pwd_data *data = priv;
        return data->state == SUCCESS;
 }
 
 
-static Boolean eap_pwd_is_done(struct eap_sm *sm, void *priv)
+static bool eap_pwd_is_done(struct eap_sm *sm, void *priv)
 {
        struct eap_pwd_data *data = priv;
        return (data->state == SUCCESS) || (data->state == FAILURE);
index 56cfbfb32e5a9bd94b1de98a25eb232964259a86..8c39e63b9242b28a7d826273f946473f8831fb43 100644 (file)
@@ -232,8 +232,8 @@ static struct wpabuf * eap_sake_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_sake_check(struct eap_sm *sm, void *priv,
-                             struct wpabuf *respData)
+static bool eap_sake_check(struct eap_sm *sm, void *priv,
+                          struct wpabuf *respData)
 {
        struct eap_sake_data *data = priv;
        struct eap_sake_hdr *resp;
@@ -244,7 +244,7 @@ static Boolean eap_sake_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_SAKE, respData, &len);
        if (pos == NULL || len < sizeof(struct eap_sake_hdr)) {
                wpa_printf(MSG_INFO, "EAP-SAKE: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        resp = (struct eap_sake_hdr *) pos;
@@ -254,33 +254,33 @@ static Boolean eap_sake_check(struct eap_sm *sm, void *priv,
 
        if (version != EAP_SAKE_VERSION) {
                wpa_printf(MSG_INFO, "EAP-SAKE: Unknown version %d", version);
-               return TRUE;
+               return true;
        }
 
        if (session_id != data->session_id) {
                wpa_printf(MSG_INFO, "EAP-SAKE: Session ID mismatch (%d,%d)",
                           session_id, data->session_id);
-               return TRUE;
+               return true;
        }
 
        wpa_printf(MSG_DEBUG, "EAP-SAKE: Received frame: subtype=%d", subtype);
 
        if (data->state == IDENTITY && subtype == EAP_SAKE_SUBTYPE_IDENTITY)
-               return FALSE;
+               return false;
 
        if (data->state == CHALLENGE && subtype == EAP_SAKE_SUBTYPE_CHALLENGE)
-               return FALSE;
+               return false;
 
        if (data->state == CONFIRM && subtype == EAP_SAKE_SUBTYPE_CONFIRM)
-               return FALSE;
+               return false;
 
        if (subtype == EAP_SAKE_SUBTYPE_AUTH_REJECT)
-               return FALSE;
+               return false;
 
        wpa_printf(MSG_INFO, "EAP-SAKE: Unexpected subtype=%d in state=%d",
                   subtype, data->state);
 
-       return TRUE;
+       return true;
 }
 
 
@@ -456,7 +456,7 @@ static void eap_sake_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_sake_isDone(struct eap_sm *sm, void *priv)
+static bool eap_sake_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_sake_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -497,7 +497,7 @@ static u8 * eap_sake_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_sake_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_sake_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_sake_data *data = priv;
        return data->state == SUCCESS;
index d7ac87ce5169d5e4e32e336cc65b0ff2a3484cb5..8a68289620796a85546a455b1d8af0c01858a225 100644 (file)
@@ -360,8 +360,8 @@ static struct wpabuf * eap_sim_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_sim_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_sim_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -369,55 +369,55 @@ static Boolean eap_sim_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_SIM, respData, &len);
        if (pos == NULL || len < 3) {
                wpa_printf(MSG_INFO, "EAP-SIM: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
-static Boolean eap_sim_unexpected_subtype(struct eap_sim_data *data,
-                                         u8 subtype)
+static bool eap_sim_unexpected_subtype(struct eap_sim_data *data,
+                                      u8 subtype)
 {
        if (subtype == EAP_SIM_SUBTYPE_CLIENT_ERROR)
-               return FALSE;
+               return false;
 
        switch (data->state) {
        case START:
                if (subtype != EAP_SIM_SUBTYPE_START) {
                        wpa_printf(MSG_INFO, "EAP-SIM: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        case CHALLENGE:
                if (subtype != EAP_SIM_SUBTYPE_CHALLENGE) {
                        wpa_printf(MSG_INFO, "EAP-SIM: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        case REAUTH:
                if (subtype != EAP_SIM_SUBTYPE_REAUTHENTICATION) {
                        wpa_printf(MSG_INFO, "EAP-SIM: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        case NOTIFICATION:
                if (subtype != EAP_SIM_SUBTYPE_NOTIFICATION) {
                        wpa_printf(MSG_INFO, "EAP-SIM: Unexpected response "
                                   "subtype %d", subtype);
-                       return TRUE;
+                       return true;
                }
                break;
        default:
                wpa_printf(MSG_INFO, "EAP-SIM: Unexpected state (%d) for "
                           "processing a response", data->state);
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -794,7 +794,7 @@ static void eap_sim_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_sim_isDone(struct eap_sm *sm, void *priv)
+static bool eap_sim_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_sim_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -833,7 +833,7 @@ static u8 * eap_sim_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_sim_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_sim_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_sim_data *data = priv;
        return data->state == SUCCESS;
index a2cbf7a7bc2a6d3a2a15a95b1bc3ba52eb8ddd39..d7b1b0995196212f198b013b24c851235ecd2f86 100644 (file)
@@ -965,8 +965,8 @@ static struct wpabuf * eap_teap_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_teap_check(struct eap_sm *sm, void *priv,
-                             struct wpabuf *respData)
+static bool eap_teap_check(struct eap_sm *sm, void *priv,
+                          struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -974,10 +974,10 @@ static Boolean eap_teap_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_TEAP, respData, &len);
        if (!pos || len < 1) {
                wpa_printf(MSG_INFO, "EAP-TEAP: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -1974,7 +1974,7 @@ static void eap_teap_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_teap_isDone(struct eap_sm *sm, void *priv)
+static bool eap_teap_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_teap_data *data = priv;
 
@@ -2032,7 +2032,7 @@ static u8 * eap_teap_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_teap_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_teap_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_teap_data *data = priv;
 
index c64cebb40549aba900934aba45c338b3ded5e7ad..769fd1fe0dc403c09fb3328e8ae9bed1185dc7b8 100644 (file)
@@ -226,8 +226,8 @@ check_established:
 }
 
 
-static Boolean eap_tls_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_tls_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_tls_data *data = priv;
        const u8 *pos;
@@ -246,10 +246,10 @@ static Boolean eap_tls_check(struct eap_sm *sm, void *priv,
                                       respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-TLS: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -346,7 +346,7 @@ static void eap_tls_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_tls_isDone(struct eap_sm *sm, void *priv)
+static bool eap_tls_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_tls_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -431,7 +431,7 @@ static u8 * eap_tls_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_tls_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_tls_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_tls_data *data = priv;
        return data->state == SUCCESS;
index f6cdcb1ef4d5b907dea22d5403f36b04fdf6f509..36fb5c34d9c44354d42c8dd54efc45d701633269 100644 (file)
@@ -320,8 +320,8 @@ static struct wpabuf * eap_tnc_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_tnc_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_tnc_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        struct eap_tnc_data *data = priv;
        const u8 *pos;
@@ -331,29 +331,29 @@ static Boolean eap_tnc_check(struct eap_sm *sm, void *priv,
                               &len);
        if (pos == NULL) {
                wpa_printf(MSG_INFO, "EAP-TNC: Invalid frame");
-               return TRUE;
+               return true;
        }
 
        if (len == 0 && data->state != WAIT_FRAG_ACK) {
                wpa_printf(MSG_INFO, "EAP-TNC: Invalid frame (empty)");
-               return TRUE;
+               return true;
        }
 
        if (len == 0)
-               return FALSE; /* Fragment ACK does not include flags */
+               return false; /* Fragment ACK does not include flags */
 
        if ((*pos & EAP_TNC_VERSION_MASK) != EAP_TNC_VERSION) {
                wpa_printf(MSG_DEBUG, "EAP-TNC: Unsupported version %d",
                           *pos & EAP_TNC_VERSION_MASK);
-               return TRUE;
+               return true;
        }
 
        if (*pos & EAP_TNC_FLAGS_START) {
                wpa_printf(MSG_DEBUG, "EAP-TNC: Peer used Start flag");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -537,14 +537,14 @@ static void eap_tnc_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_tnc_isDone(struct eap_sm *sm, void *priv)
+static bool eap_tnc_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_tnc_data *data = priv;
        return data->state == DONE || data->state == FAIL;
 }
 
 
-static Boolean eap_tnc_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_tnc_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_tnc_data *data = priv;
        return data->state == DONE;
index 721835dbf1232f49abf3d940c3129688e1cc10c0..2f0c041d5a9e17e3e6f4f9dc5a8d8956dfca1dbd 100644 (file)
@@ -509,8 +509,8 @@ static struct wpabuf * eap_ttls_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_ttls_check(struct eap_sm *sm, void *priv,
-                             struct wpabuf *respData)
+static bool eap_ttls_check(struct eap_sm *sm, void *priv,
+                          struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -518,10 +518,10 @@ static Boolean eap_ttls_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_TTLS, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-TTLS: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -1260,7 +1260,7 @@ static void eap_ttls_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_ttls_isDone(struct eap_sm *sm, void *priv)
+static bool eap_ttls_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_ttls_data *data = priv;
        return data->state == SUCCESS || data->state == FAILURE;
@@ -1290,7 +1290,7 @@ static u8 * eap_ttls_getKey(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_ttls_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_ttls_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_ttls_data *data = priv;
        return data->state == SUCCESS;
index 96399775945b85cbfc4890bc7426713e8ee72315..77860411b77bc6341a9f7aea9cba0339581d7636 100644 (file)
@@ -88,8 +88,8 @@ static struct wpabuf * eap_vendor_test_buildReq(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_vendor_test_check(struct eap_sm *sm, void *priv,
-                                    struct wpabuf *respData)
+static bool eap_vendor_test_check(struct eap_sm *sm, void *priv,
+                                 struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -97,10 +97,10 @@ static Boolean eap_vendor_test_check(struct eap_sm *sm, void *priv,
        pos = eap_hdr_validate(EAP_VENDOR_ID, EAP_VENDOR_TYPE, respData, &len);
        if (pos == NULL || len < 1) {
                wpa_printf(MSG_INFO, "EAP-VENDOR-TEST: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -130,7 +130,7 @@ static void eap_vendor_test_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_vendor_test_isDone(struct eap_sm *sm, void *priv)
+static bool eap_vendor_test_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_vendor_test_data *data = priv;
        return data->state == SUCCESS;
@@ -158,7 +158,7 @@ static u8 * eap_vendor_test_getKey(struct eap_sm *sm, void *priv, size_t *len)
 }
 
 
-static Boolean eap_vendor_test_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_vendor_test_isSuccess(struct eap_sm *sm, void *priv)
 {
        struct eap_vendor_test_data *data = priv;
        return data->state == SUCCESS;
index 364c089aaff84b9ca5ec14ce3572855db9c70a62..fc70cf1962dbe9b552609b7fd72eea8e35cd0b8e 100644 (file)
@@ -270,8 +270,8 @@ static struct wpabuf * eap_wsc_buildReq(struct eap_sm *sm, void *priv, u8 id)
 }
 
 
-static Boolean eap_wsc_check(struct eap_sm *sm, void *priv,
-                            struct wpabuf *respData)
+static bool eap_wsc_check(struct eap_sm *sm, void *priv,
+                         struct wpabuf *respData)
 {
        const u8 *pos;
        size_t len;
@@ -280,10 +280,10 @@ static Boolean eap_wsc_check(struct eap_sm *sm, void *priv,
                               respData, &len);
        if (pos == NULL || len < 2) {
                wpa_printf(MSG_INFO, "EAP-WSC: Invalid frame");
-               return TRUE;
+               return true;
        }
 
-       return FALSE;
+       return false;
 }
 
 
@@ -462,17 +462,17 @@ static void eap_wsc_process(struct eap_sm *sm, void *priv,
 }
 
 
-static Boolean eap_wsc_isDone(struct eap_sm *sm, void *priv)
+static bool eap_wsc_isDone(struct eap_sm *sm, void *priv)
 {
        struct eap_wsc_data *data = priv;
        return data->state == FAIL;
 }
 
 
-static Boolean eap_wsc_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_wsc_isSuccess(struct eap_sm *sm, void *priv)
 {
        /* EAP-WSC will always result in EAP-Failure */
-       return FALSE;
+       return false;
 }