File tree Expand file tree Collapse file tree 7 files changed +427
-525
lines changed Expand file tree Collapse file tree 7 files changed +427
-525
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2025 Nordic Semiconductor ASA
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #ifndef WIFI_CERTS_H__
8
+ #define WIFI_CERTS_H__
9
+
10
+ #include <stdbool.h>
11
+ #include <zephyr/kernel.h>
12
+ #include <zephyr/net/wifi_mgmt.h>
13
+
14
+ /**
15
+ * Set Wi-Fi Enterprise credentials.
16
+ *
17
+ * Sets up the required credentials for Enterprise mode in both
18
+ * Access Point and Station modes.
19
+ *
20
+ * Certificates typically used:
21
+ * - CA certificate
22
+ * - Client certificate
23
+ * - Client private key
24
+ * - Server certificate and server key (for AP mode)
25
+ *
26
+ * @param iface Network interface
27
+ * @param AP or Station mode
28
+ *
29
+ * @return 0 if ok, < 0 if error
30
+ */
31
+ int wifi_set_enterprise_credentials (struct net_if * iface , bool is_ap );
32
+
33
+ /**
34
+ * Clear Wi-Fi enterprise credentials
35
+ *
36
+ * @param Wi-Fi enterprise params
37
+ */
38
+ void wifi_clear_enterprise_credentials (void );
39
+
40
+ #endif /* WIFI_CERTS_H__ */
Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ config WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
198
198
select MBEDTLS_SERVER_NAME_INDICATION if MBEDTLS_BUILTIN
199
199
select MBEDTLS_X509_CRL_PARSE_C
200
200
select MBEDTLS_TLS_VERSION_1_2
201
+ select WIFI_CERTIFICATE_LIB
201
202
depends on !WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE
202
203
203
204
if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
@@ -302,6 +303,7 @@ config WIFI_NM_HOSTAPD_AP
302
303
303
304
config WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE
304
305
bool "Hostapd crypto enterprise support"
306
+ select WIFI_CERTIFICATE_LIB
305
307
depends on WIFI_NM_HOSTAPD_AP
306
308
307
309
if WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ zephyr_library_include_directories_ifdef(
13
13
)
14
14
15
15
zephyr_library_sources_ifdef (CONFIG_NET_L2_WIFI_MGMT wifi_mgmt.c )
16
+ zephyr_library_sources_ifdef (CONFIG_WIFI_CERTIFICATE_LIB wifi_certs.c )
16
17
zephyr_library_sources_ifdef (CONFIG_NET_L2_WIFI_SHELL wifi_shell.c )
17
18
zephyr_library_sources_ifdef (CONFIG_WIFI_NM wifi_nm.c )
18
19
zephyr_library_sources_ifdef (CONFIG_NET_L2_WIFI_UTILS wifi_utils.c )
Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ config WIFI_ENT_IDENTITY_MAX_USERS
126
126
help
127
127
This option defines the maximum number of identity users allowed connection.
128
128
129
+ config WIFI_CERTIFICATE_LIB
130
+ bool
131
+ help
132
+ Enable this option to process certificates in enterprise mode.
133
+
129
134
if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
130
135
131
136
config WIFI_SHELL_RUNTIME_CERTIFICATES
You can’t perform that action at this time.
0 commit comments