Skip to content

Commit 77deec1

Browse files
authored
Merge pull request #42 from david-cermak/feat/eap_prototypes
Support for EAP client API
2 parents 1f1e737 + 1dd70b6 commit 77deec1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2601
-15
lines changed

.github/workflows/smoke_compat.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
matrix:
3636
idf_ver: ["latest", "release-v5.5", "release-v5.4", "release-v5.3", "v5.4.1", "v5.3.3"] # Removed "v5.3.1", "v5.3.2" and "v5.4" as unsupported
3737
idf_target: ["esp32p4", "esp32h2", "esp32s3"]
38-
test: [ { app: idf_mqtt_example, path: "examples/protocols/mqtt/tcp" }]
38+
test: [ { app: idf_mqtt_example, path: "examples/protocols/mqtt/tcp" }, { app: wifi_enterprise, path: "examples/wifi/wifi_enterprise" }]
3939
runs-on: ubuntu-latest
4040
container: espressif/idf:${{ matrix.idf_ver }}
4141
steps:
@@ -52,6 +52,12 @@ jobs:
5252
pip install idf-component-manager idf-build-apps --upgrade
5353
export OVERRIDE_PATH=`pwd`/components/esp_wifi_remote
5454
echo ${OVERRIDE_PATH}
55+
if [ "${{matrix.test.app}}" = "wifi_enterprise" ]; then
56+
cd ${IDF_PATH}/${{matrix.test.path}}
57+
echo -e "dependencies:\n espressif/esp_wifi_remote:\n version: \"*\"\n rules:\n - if: \"target in [esp32p4, esp32h2]\"" > main/idf_component.yml
58+
echo -e "CONFIG_ESP_WIFI_REMOTE_EAP_ENABLED=y" > sdkconfig.defaults
59+
cd -
60+
fi
5561
sed -i '/espressif\/esp_wifi_remote:/a \ \ \ \ override_path: "${OVERRIDE_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
5662
cat ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
5763
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"

components/esp_wifi_remote/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(wifi_remote): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py esp_wifi_remote
55
tag_format: wifi_remote-v$version
6-
version: 0.12.2
6+
version: 0.13.0
77
version_files:
88
- idf_component.yml

components/esp_wifi_remote/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## [0.13.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.13.0)
4+
5+
### Features
6+
7+
- Add support for EAP client API ([ffe2af7](https://github.com/espressif/esp-wifi-remote/commit/ffe2af7))
8+
9+
### Bug Fixes
10+
11+
- Regenerate all files with EAP client support ([1d39117](https://github.com/espressif/esp-wifi-remote/commit/1d39117))
12+
313
## [0.12.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.12.2)
414

515
### Bug Fixes

components/esp_wifi_remote/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ set(TARGET_INCLUDE_TYPE "INTERFACE")
3131
set(TARGET_SOURCE_TYPE "INTERFACE")
3232
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
3333
set(src_wifi_with_remote ${IDF_VER_DIR}/esp_wifi_with_remote.c)
34+
if(CONFIG_ESP_WIFI_REMOTE_EAP_ENABLED)
35+
list(APPEND src_wifi_with_remote ${IDF_VER_DIR}/esp_eap_client_with_remote.c)
36+
endif()
3437
# We need to build wifi sources with wifi-remote properties, so the injected wifi headers are used
3538
get_target_property(wifi_sources ${wifi} SOURCES)
3639
set_target_properties(${wifi} PROPERTIES SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dummy_src.c")
@@ -43,6 +46,9 @@ if(CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP)
4346
set(TARGET_SOURCE_TYPE "PRIVATE")
4447
else()
4548
set(src_wifi_remote_weak ${IDF_VER_DIR}/esp_wifi_remote_weak.c)
49+
if(CONFIG_ESP_WIFI_REMOTE_EAP_ENABLED)
50+
list(APPEND src_wifi_remote_weak ${IDF_VER_DIR}/esp_eap_client_remote_weak.c)
51+
endif()
4652
endif()
4753

4854

@@ -59,3 +65,7 @@ if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
5965
endif()
6066

6167
target_link_libraries(${wifi} PUBLIC ${COMPONENT_LIB})
68+
69+
if(CONFIG_ESP_WIFI_REMOTE_EAP_ENABLED)
70+
idf_component_optional_requires(${TARGET_INCLUDE_TYPE} wpa_supplicant)
71+
endif()

components/esp_wifi_remote/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ menu "Wi-Fi Remote"
99
orsource "./idf_v$ESP_IDF_VERSION/Kconfig.soc_wifi_caps.in"
1010
orsource "./Kconfig.rpc.in"
1111

12+
config ESP_WIFI_REMOTE_EAP_ENABLED
13+
bool "Enable EAP client remote API"
14+
default y
15+
depends on WIFI_RMT_ENTERPRISE_SUPPORT
16+
help
17+
When enabled, the EAP client remote API will be available.
18+
This allows remote control of EAP authentication functions.
19+
1220
menu "Wi-Fi configuration"
1321
orsource "./idf_v$ESP_IDF_VERSION/Kconfig.wifi.in"
1422
endmenu

components/esp_wifi_remote/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.12.2
1+
version: 0.13.0
22
url: https://github.com/espressif/esp-wifi-remote
33
description: Utility wrapper for esp_wifi functionality on remote targets
44
dependencies:
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
// This file is auto-generated
7+
#include "esp_eap_client_remote_api.h"
8+
#include "esp_log.h"
9+
10+
#define WEAK __attribute__((weak))
11+
#define LOG_UNSUPPORTED_AND_RETURN(ret) ESP_LOGW("esp_eap_client_remote_weak", "%s unsupported", __func__); \
12+
return ret;
13+
#define LOG_UNSUPPORTED_VOID() ESP_LOGW("esp_eap_client_remote_weak", "%s unsupported", __func__);
14+
15+
WEAK esp_err_t esp_wifi_remote_sta_enterprise_enable(void)
16+
{
17+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
18+
}
19+
20+
WEAK esp_err_t esp_wifi_remote_sta_enterprise_disable(void)
21+
{
22+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
23+
}
24+
25+
WEAK esp_err_t esp_eap_client_remote_set_identity(const unsigned char *identity, int len)
26+
{
27+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
28+
}
29+
30+
WEAK void esp_eap_client_remote_clear_identity(void)
31+
{
32+
LOG_UNSUPPORTED_VOID();
33+
}
34+
35+
WEAK esp_err_t esp_eap_client_remote_set_username(const unsigned char *username, int len)
36+
{
37+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
38+
}
39+
40+
WEAK void esp_eap_client_remote_clear_username(void)
41+
{
42+
LOG_UNSUPPORTED_VOID();
43+
}
44+
45+
WEAK esp_err_t esp_eap_client_remote_set_password(const unsigned char *password, int len)
46+
{
47+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
48+
}
49+
50+
WEAK void esp_eap_client_remote_clear_password(void)
51+
{
52+
LOG_UNSUPPORTED_VOID();
53+
}
54+
55+
WEAK esp_err_t esp_eap_client_remote_set_new_password(const unsigned char *new_password, int len)
56+
{
57+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
58+
}
59+
60+
WEAK void esp_eap_client_remote_clear_new_password(void)
61+
{
62+
LOG_UNSUPPORTED_VOID();
63+
}
64+
65+
WEAK esp_err_t esp_eap_client_remote_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len)
66+
{
67+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
68+
}
69+
70+
WEAK void esp_eap_client_remote_clear_ca_cert(void)
71+
{
72+
LOG_UNSUPPORTED_VOID();
73+
}
74+
75+
WEAK esp_err_t esp_eap_client_remote_set_certificate_and_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_password, int private_key_passwd_len)
76+
{
77+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
78+
}
79+
80+
WEAK void esp_eap_client_remote_clear_certificate_and_key(void)
81+
{
82+
LOG_UNSUPPORTED_VOID();
83+
}
84+
85+
WEAK esp_err_t esp_eap_client_remote_set_disable_time_check(_Bool disable)
86+
{
87+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
88+
}
89+
90+
WEAK esp_err_t esp_eap_client_remote_get_disable_time_check(_Bool *disable)
91+
{
92+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
93+
}
94+
95+
WEAK esp_err_t esp_eap_client_remote_set_ttls_phase2_method(esp_eap_ttls_phase2_types type)
96+
{
97+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
98+
}
99+
100+
WEAK esp_err_t esp_eap_client_remote_set_suiteb_192bit_certification(_Bool enable)
101+
{
102+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
103+
}
104+
105+
WEAK esp_err_t esp_eap_client_remote_set_pac_file(const unsigned char *pac_file, int pac_file_len)
106+
{
107+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
108+
}
109+
110+
WEAK esp_err_t esp_eap_client_remote_set_fast_params(esp_eap_fast_config config)
111+
{
112+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
113+
}
114+
115+
WEAK esp_err_t esp_eap_client_remote_use_default_cert_bundle(_Bool use_default_bundle)
116+
{
117+
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
118+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
// This file is auto-generated
7+
#include "esp_eap_client.h"
8+
#include "esp_eap_client_remote_api.h"
9+
10+
esp_err_t esp_wifi_sta_enterprise_enable(void)
11+
{
12+
return esp_wifi_remote_sta_enterprise_enable();
13+
}
14+
15+
esp_err_t esp_wifi_sta_enterprise_disable(void)
16+
{
17+
return esp_wifi_remote_sta_enterprise_disable();
18+
}
19+
20+
esp_err_t esp_eap_client_set_identity(const unsigned char *identity, int len)
21+
{
22+
return esp_eap_client_remote_set_identity(identity, len);
23+
}
24+
25+
void esp_eap_client_clear_identity(void)
26+
{
27+
esp_eap_client_remote_clear_identity();
28+
}
29+
30+
esp_err_t esp_eap_client_set_username(const unsigned char *username, int len)
31+
{
32+
return esp_eap_client_remote_set_username(username, len);
33+
}
34+
35+
void esp_eap_client_clear_username(void)
36+
{
37+
esp_eap_client_remote_clear_username();
38+
}
39+
40+
esp_err_t esp_eap_client_set_password(const unsigned char *password, int len)
41+
{
42+
return esp_eap_client_remote_set_password(password, len);
43+
}
44+
45+
void esp_eap_client_clear_password(void)
46+
{
47+
esp_eap_client_remote_clear_password();
48+
}
49+
50+
esp_err_t esp_eap_client_set_new_password(const unsigned char *new_password, int len)
51+
{
52+
return esp_eap_client_remote_set_new_password(new_password, len);
53+
}
54+
55+
void esp_eap_client_clear_new_password(void)
56+
{
57+
esp_eap_client_remote_clear_new_password();
58+
}
59+
60+
esp_err_t esp_eap_client_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len)
61+
{
62+
return esp_eap_client_remote_set_ca_cert(ca_cert, ca_cert_len);
63+
}
64+
65+
void esp_eap_client_clear_ca_cert(void)
66+
{
67+
esp_eap_client_remote_clear_ca_cert();
68+
}
69+
70+
esp_err_t esp_eap_client_set_certificate_and_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_password, int private_key_passwd_len)
71+
{
72+
return esp_eap_client_remote_set_certificate_and_key(client_cert, client_cert_len, private_key, private_key_len, private_key_password, private_key_passwd_len);
73+
}
74+
75+
void esp_eap_client_clear_certificate_and_key(void)
76+
{
77+
esp_eap_client_remote_clear_certificate_and_key();
78+
}
79+
80+
esp_err_t esp_eap_client_set_disable_time_check(_Bool disable)
81+
{
82+
return esp_eap_client_remote_set_disable_time_check(disable);
83+
}
84+
85+
esp_err_t esp_eap_client_get_disable_time_check(_Bool *disable)
86+
{
87+
return esp_eap_client_remote_get_disable_time_check(disable);
88+
}
89+
90+
esp_err_t esp_eap_client_set_ttls_phase2_method(esp_eap_ttls_phase2_types type)
91+
{
92+
return esp_eap_client_remote_set_ttls_phase2_method(type);
93+
}
94+
95+
esp_err_t esp_eap_client_set_suiteb_192bit_certification(_Bool enable)
96+
{
97+
return esp_eap_client_remote_set_suiteb_192bit_certification(enable);
98+
}
99+
100+
esp_err_t esp_eap_client_set_pac_file(const unsigned char *pac_file, int pac_file_len)
101+
{
102+
return esp_eap_client_remote_set_pac_file(pac_file, pac_file_len);
103+
}
104+
105+
esp_err_t esp_eap_client_set_fast_params(esp_eap_fast_config config)
106+
{
107+
return esp_eap_client_remote_set_fast_params(config);
108+
}
109+
110+
esp_err_t esp_eap_client_use_default_cert_bundle(_Bool use_default_bundle)
111+
{
112+
return esp_eap_client_remote_use_default_cert_bundle(use_default_bundle);
113+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
// This file is auto-generated
7+
#pragma once
8+
#include "esp_eap_client.h"
9+
esp_err_t esp_wifi_remote_sta_enterprise_enable(void);
10+
esp_err_t esp_wifi_remote_sta_enterprise_disable(void);
11+
esp_err_t esp_eap_client_remote_set_identity(const unsigned char *identity, int len);
12+
void esp_eap_client_remote_clear_identity(void);
13+
esp_err_t esp_eap_client_remote_set_username(const unsigned char *username, int len);
14+
void esp_eap_client_remote_clear_username(void);
15+
esp_err_t esp_eap_client_remote_set_password(const unsigned char *password, int len);
16+
void esp_eap_client_remote_clear_password(void);
17+
esp_err_t esp_eap_client_remote_set_new_password(const unsigned char *new_password, int len);
18+
void esp_eap_client_remote_clear_new_password(void);
19+
esp_err_t esp_eap_client_remote_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len);
20+
void esp_eap_client_remote_clear_ca_cert(void);
21+
esp_err_t esp_eap_client_remote_set_certificate_and_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_password, int private_key_passwd_len);
22+
void esp_eap_client_remote_clear_certificate_and_key(void);
23+
esp_err_t esp_eap_client_remote_set_disable_time_check(_Bool disable);
24+
esp_err_t esp_eap_client_remote_get_disable_time_check(_Bool *disable);
25+
esp_err_t esp_eap_client_remote_set_ttls_phase2_method(esp_eap_ttls_phase2_types type);
26+
esp_err_t esp_eap_client_remote_set_suiteb_192bit_certification(_Bool enable);
27+
esp_err_t esp_eap_client_remote_set_pac_file(const unsigned char *pac_file, int pac_file_len);
28+
esp_err_t esp_eap_client_remote_set_fast_params(esp_eap_fast_config config);
29+
esp_err_t esp_eap_client_remote_use_default_cert_bundle(_Bool use_default_bundle);

0 commit comments

Comments
 (0)