diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c index 62fc38e561..ed82f48e4f 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c @@ -260,4 +260,12 @@ void esp_wifi_register_wpa3_cb(struct wpa_funcs *wpa_cb) wpa_cb->wpa3_parse_sae_msg = wpa3_parse_sae_msg; } +void esp_wifi_unregister_wpa3_cb(void) +{ + extern struct wpa_funcs *wpa_cb; + + wpa_cb->wpa3_build_sae_msg = NULL; + wpa_cb->wpa3_parse_sae_msg = NULL; + +} #endif /* CONFIG_WPA3_SAE */ diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c index d964f61ed3..3085b86a71 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c @@ -29,6 +29,7 @@ #include "esp_wpa2.h" #include "esp_common_i.h" +struct wpa_funcs *wpa_cb; void wpa_install_key(enum wpa_alg alg, u8 *addr, int key_idx, int set_tx, u8 *seq, size_t seq_len, u8 *key, size_t key_len, enum key_flag key_flag) { @@ -229,7 +230,6 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code) int esp_supplicant_init(void) { int ret = ESP_OK; - struct wpa_funcs *wpa_cb; wpa_cb = (struct wpa_funcs *)os_zalloc(sizeof(struct wpa_funcs)); if (!wpa_cb) { diff --git a/components/wpa_supplicant/src/eap_peer/eap.c b/components/wpa_supplicant/src/eap_peer/eap.c index 7cc829d0c3..5600649962 100644 --- a/components/wpa_supplicant/src/eap_peer/eap.c +++ b/components/wpa_supplicant/src/eap_peer/eap.c @@ -618,6 +618,7 @@ void eap_peer_config_deinit(struct eap_sm *sm) os_free(sm->config.new_password); os_free(sm->config.eap_methods); os_bzero(&sm->config, sizeof(struct eap_peer_config)); + config_methods = NULL; } int eap_peer_blob_init(struct eap_sm *sm) diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index da35dd88d2..9f1ec1143b 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -2421,7 +2421,19 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, extern bool g_wpa_suiteb_certification; if (g_wpa_suiteb_certification) { if (mgmt_cipher != WIFI_CIPHER_TYPE_AES_GMAC256) { - wpa_printf(MSG_ERROR, "suite-b 192bit certification, only GMAC256 is supported"); + wpa_printf(MSG_ERROR, "suite-b 192bit certification, only GMAC256 is supported for management cipher"); + return -1; + } + if (sm->group_cipher != WPA_CIPHER_GCMP_256) { + wpa_printf(MSG_ERROR, "suite-b 192bit certification, only group GCMP256 is supported for group data cipher."); + return -1; + } + if (sm->pairwise_cipher != WPA_CIPHER_GCMP_256) { + wpa_printf(MSG_ERROR,"suite-b 192bit certification, only group GCMP256 is supported for pairwise cipher"); + return -1; + } + if (sm->key_mgmt != WPA_KEY_MGMT_IEEE8021X_SUITE_B_192) { + wpa_printf(MSG_ERROR, "suite-b 192bit certification, 192bit akm supported"); return -1; } }