File tree Expand file tree Collapse file tree 7 files changed +425
-525
lines changed Expand file tree Collapse file tree 7 files changed +425
-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 is_ap 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
+ void wifi_clear_enterprise_credentials (void );
37
+
38
+ #endif /* WIFI_CERTS_H__ */
Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ config WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
221
221
select MBEDTLS_X509_CRL_PARSE_C
222
222
select MBEDTLS_TLS_VERSION_1_2
223
223
select NOT_SECURE
224
+ select WIFI_CERTIFICATE_LIB
224
225
depends on !WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE
225
226
help
226
227
Enable Enterprise Crypto support for WiFi. This feature
@@ -329,6 +330,7 @@ config WIFI_NM_HOSTAPD_AP
329
330
330
331
config WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE
331
332
bool "Hostapd crypto enterprise support"
333
+ select WIFI_CERTIFICATE_LIB
332
334
depends on WIFI_NM_HOSTAPD_AP
333
335
334
336
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