1# 2# Copyright (c) 2023 Nordic Semiconductor ASA 3# 4# SPDX-License-Identifier: Apache-2.0 5# 6 7if(CONFIG_WIFI_NM_WPA_SUPPLICANT) 8 9zephyr_interface_library_named(hostap) 10 11set(HOSTAP_BASE ${ZEPHYR_HOSTAP_MODULE_DIR}) 12set(WIFI_NM_WPA_SUPPLICANT_BASE ${HOSTAP_BASE}/wpa_supplicant) 13set(HOSTAP_SRC_BASE ${HOSTAP_BASE}/src) 14set(WIFI_NM_HOSTAPD_BASE ${HOSTAP_BASE}/hostapd) 15 16set(CMAKE_EXE_LINKER_FLAGS "--specs=nosys.specs -lnosys") 17set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMISSING_SYSCALL_NAMES") 18 19zephyr_include_directories( 20 src/ 21 ${HOSTAP_BASE}/ 22 ${WIFI_NM_WPA_SUPPLICANT_BASE}/ 23 ${HOSTAP_SRC_BASE}/ 24 ${HOSTAP_SRC_BASE}/common/ 25 ${HOSTAP_SRC_BASE}/eap_common 26 ${HOSTAP_SRC_BASE}/eap_server 27 ${HOSTAP_SRC_BASE}/radius 28 ${HOSTAP_SRC_BASE}/crypto/ 29 ${HOSTAP_SRC_BASE}/ap/ 30 ${HOSTAP_SRC_BASE}/drivers/ 31 ${HOSTAP_SRC_BASE}/rsn_supp 32) 33 34target_include_directories(hostap INTERFACE 35 ${HOSTAP_SRC_BASE}/utils/ 36) 37 38zephyr_library_compile_definitions( 39 TLS_DEFAULT_CIPHERS=\""DEFAULT:!EXP:!LOW"\" 40 CONFIG_SME 41 CONFIG_NO_CONFIG_WRITE 42 CONFIG_CTRL_IFACE 43 CONFIG_NO_RANDOM_POOL 44 CONFIG_SHA256 45 CONFIG_SHA384 46 CONFIG_SHA512 47 CONFIG_CTRL_IFACE_ZEPHYR 48 CONFIG_SUITEB192 49 CONFIG_SUITEB 50) 51 52 53zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE 54 CONFIG_NO_PBKDF2 55) 56 57zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_NO_DEBUG 58 CONFIG_NO_STDOUT_DEBUG 59) 60 61zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_ROBUST_AV 62 CONFIG_ROBUST_AV 63) 64 65zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WMM_AC 66 CONFIG_WMM_AC 67) 68 69zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_RRM 70 CONFIG_RRM 71) 72 73zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_ROBUST_AV 74 CONFIG_ROBUST_AV 75) 76 77zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_MBO 78 CONFIG_MBO 79) 80 81zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM 82 CONFIG_WNM 83) 84 85zephyr_library_include_directories( 86 ${CMAKE_CURRENT_SOURCE_DIR}/src 87 ${HOSTAP_BASE}/ 88 ${HOSTAP_SRC_BASE}/utils 89 ${HOSTAP_SRC_BASE}/drivers 90 ${HOSTAP_BASE}/src 91 ${ZEPHYR_BASE}/include 92 ${ZEPHYR_BASE}/include/net 93 ) 94 95zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_NO_DEBUG 96 CONFIG_NO_STDOUT_DEBUG 97) 98 99zephyr_library_sources( 100 ${HOSTAP_SRC_BASE}/common/wpa_common.c 101 ${HOSTAP_SRC_BASE}/common/ieee802_11_common.c 102 ${HOSTAP_SRC_BASE}/common/hw_features_common.c 103 ${HOSTAP_SRC_BASE}/common/wpa_ctrl.c 104 ${HOSTAP_SRC_BASE}/common/cli.c 105 106 ${HOSTAP_SRC_BASE}/drivers/driver_common.c 107 ${HOSTAP_SRC_BASE}/drivers/drivers.c 108 ${HOSTAP_SRC_BASE}/utils/crc32.c 109 ${HOSTAP_SRC_BASE}/utils/base64.c 110 ${HOSTAP_SRC_BASE}/utils/common.c 111 ${HOSTAP_SRC_BASE}/utils/wpabuf.c 112 ${HOSTAP_SRC_BASE}/utils/bitfield.c 113 ${HOSTAP_SRC_BASE}/utils/eloop.c 114 ${HOSTAP_SRC_BASE}/utils/os_zephyr.c 115 ${HOSTAP_SRC_BASE}/utils/wpa_debug_zephyr.c 116 ${HOSTAP_SRC_BASE}/l2_packet/l2_packet_zephyr.c 117 ${HOSTAP_SRC_BASE}/drivers/driver_zephyr.c 118 119 ${WIFI_NM_WPA_SUPPLICANT_BASE}/config.c 120 ${WIFI_NM_WPA_SUPPLICANT_BASE}/notify.c 121 ${WIFI_NM_WPA_SUPPLICANT_BASE}/eap_register.c 122 ${WIFI_NM_WPA_SUPPLICANT_BASE}/config_none.c 123 ${WIFI_NM_WPA_SUPPLICANT_BASE}/bssid_ignore.c 124 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wpas_glue.c 125 ${WIFI_NM_WPA_SUPPLICANT_BASE}/scan.c 126 ${WIFI_NM_WPA_SUPPLICANT_BASE}/ctrl_iface.c 127 128 ${WIFI_NM_WPA_SUPPLICANT_BASE}/bss.c 129 ${WIFI_NM_WPA_SUPPLICANT_BASE}/sme.c 130 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wpa_supplicant.c 131 ${WIFI_NM_WPA_SUPPLICANT_BASE}/events.c 132 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wpa_cli_cmds.c 133 ${WIFI_NM_WPA_SUPPLICANT_BASE}/ctrl_iface_zephyr.c 134 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wpa_cli_zephyr.c 135 136 ${HOSTAP_SRC_BASE}/rsn_supp/pmksa_cache.c 137 ${HOSTAP_SRC_BASE}/common/ptksa_cache.c 138 139 # Zephyr specific files (glue code) 140 src/supp_main.c 141 src/supp_api.c 142 src/supp_events.c 143) 144 145# Advanced features 146zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_RRM 147 ${WIFI_NM_WPA_SUPPLICANT_BASE}/op_classes.c 148 ${WIFI_NM_WPA_SUPPLICANT_BASE}/rrm.c 149) 150zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WMM_AC 151 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wmm_ac.c 152) 153zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_ROBUST_AV 154 ${WIFI_NM_WPA_SUPPLICANT_BASE}/robust_av.c 155) 156zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_MBO 157 ${WIFI_NM_WPA_SUPPLICANT_BASE}/mbo.c 158) 159zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM 160 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wnm_sta.c 161) 162 163zephyr_library_sources_ifdef(CONFIG_WPA_CLI 164 src/wpa_cli.c 165) 166 167zephyr_library_sources_ifdef(CONFIG_IEEE80211R 168 ${HOSTAP_SRC_BASE}/rsn_supp/wpa_ft.c 169 ${HOSTAP_SRC_BASE}/ap/wpa_auth_ft.c 170) 171 172if(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP OR CONFIG_WIFI_NM_HOSTAPD_AP) 173zephyr_library_sources( 174 ${WIFI_NM_WPA_SUPPLICANT_BASE}/ap.c 175 ${HOSTAP_SRC_BASE}/ap/ap_config.c 176 ${HOSTAP_SRC_BASE}/ap/ap_drv_ops.c 177 ${HOSTAP_SRC_BASE}/ap/ap_list.c 178 ${HOSTAP_SRC_BASE}/ap/ap_mlme.c 179 ${HOSTAP_SRC_BASE}/ap/authsrv.c 180 ${HOSTAP_SRC_BASE}/ap/beacon.c 181 ${HOSTAP_SRC_BASE}/ap/bss_load.c 182 ${HOSTAP_SRC_BASE}/ap/dfs.c 183 ${HOSTAP_SRC_BASE}/ap/drv_callbacks.c 184 ${HOSTAP_SRC_BASE}/ap/ctrl_iface_ap.c 185 ${HOSTAP_SRC_BASE}/ap/eap_user_db.c 186 ${HOSTAP_SRC_BASE}/ap/hostapd.c 187 ${HOSTAP_SRC_BASE}/ap/hw_features.c 188 ${HOSTAP_SRC_BASE}/ap/ieee802_11_auth.c 189 ${HOSTAP_SRC_BASE}/ap/ieee802_11.c 190 ${HOSTAP_SRC_BASE}/ap/comeback_token.c 191 ${HOSTAP_SRC_BASE}/ap/ieee802_11_ht.c 192 ${HOSTAP_SRC_BASE}/ap/ieee802_11_shared.c 193 ${HOSTAP_SRC_BASE}/ap/ieee802_11_vht.c 194 ${HOSTAP_SRC_BASE}/ap/ieee802_1x.c 195 ${HOSTAP_SRC_BASE}/ap/neighbor_db.c 196 ${HOSTAP_SRC_BASE}/ap/p2p_hostapd.c 197 ${HOSTAP_SRC_BASE}/ap/pmksa_cache_auth.c 198 ${HOSTAP_SRC_BASE}/ap/preauth_auth.c 199 ${HOSTAP_SRC_BASE}/ap/rrm.c 200 ${HOSTAP_SRC_BASE}/ap/sta_info.c 201 ${HOSTAP_SRC_BASE}/ap/tkip_countermeasures.c 202 ${HOSTAP_SRC_BASE}/ap/utils.c 203 ${HOSTAP_SRC_BASE}/ap/wmm.c 204 205 ${HOSTAP_SRC_BASE}/ap/wpa_auth.c 206 ${HOSTAP_SRC_BASE}/ap/wpa_auth_ie.c 207 ${HOSTAP_SRC_BASE}/ap/wpa_auth_ft.c 208 ${HOSTAP_SRC_BASE}/ap/wpa_auth_glue.c 209 210 ${HOSTAP_SRC_BASE}/eap_common/eap_common.c 211 ${HOSTAP_SRC_BASE}/eap_server/eap_server.c 212 ${HOSTAP_SRC_BASE}/eap_server/eap_server_identity.c 213 ${HOSTAP_SRC_BASE}/eap_server/eap_server_methods.c 214 ${HOSTAP_SRC_BASE}/eapol_auth/eapol_auth_sm.c 215 ${HOSTAP_SRC_BASE}/ap/mbo_ap.c 216 ${HOSTAP_SRC_BASE}/ap/ctrl_iface_ap.c 217 ${HOSTAP_SRC_BASE}/utils/crc32.c 218 ${HOSTAP_SRC_BASE}/utils/ip_addr.c 219) 220 221zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_11AX 222 ${HOSTAP_SRC_BASE}/ap/ieee802_11_he.c 223) 224 225zephyr_library_compile_definitions( 226 CONFIG_AP 227 CONFIG_NO_RADIUS 228 CONFIG_NO_VLAN 229 CONFIG_NO_ACCOUNTING 230 NEED_AP_MLME 231 CONFIG_IEEE80211AC 232 EAP_SERVER 233 EAP_SERVER_IDENTITY 234) 235 236zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_11AX 237 CONFIG_IEEE80211AX 238) 239endif() 240 241zephyr_include_directories_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP 242 ${WIFI_NM_HOSTAPD_BASE}/ 243) 244 245zephyr_library_sources_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP 246 ${HOSTAP_SRC_BASE}/ap/acs.c 247 ${WIFI_NM_HOSTAPD_BASE}/config_file.c 248 ${WIFI_NM_HOSTAPD_BASE}/ctrl_iface.c 249 ${WIFI_NM_HOSTAPD_BASE}/ctrl_iface_zephyr.c 250 ${WIFI_NM_HOSTAPD_BASE}/eap_register.c 251 ${WIFI_NM_HOSTAPD_BASE}/hostapd_cli_cmds.c 252 ${WIFI_NM_HOSTAPD_BASE}/hostapd_cli_zephyr.c 253) 254 255zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP 256 HOSTAPD 257 CONFIG_ACS 258) 259 260zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE 261 ${HOSTAP_SRC_BASE}/crypto/crypto_none.c 262 263 # FIXME: why do we need these when crypto is not selected? 264 ${HOSTAP_SRC_BASE}/crypto/aes-wrap.c 265 ${HOSTAP_SRC_BASE}/crypto/aes-unwrap.c 266 ${HOSTAP_SRC_BASE}/crypto/aes-internal.c 267 ${HOSTAP_SRC_BASE}/crypto/aes-internal-enc.c 268 ${HOSTAP_SRC_BASE}/crypto/aes-internal-dec.c 269 ${HOSTAP_SRC_BASE}/crypto/aes-omac1.c 270 ${HOSTAP_SRC_BASE}/crypto/md5.c 271 ${HOSTAP_SRC_BASE}/crypto/md5-internal.c 272 ${HOSTAP_SRC_BASE}/crypto/sha1.c 273 ${HOSTAP_SRC_BASE}/crypto/sha1-internal.c 274 ${HOSTAP_SRC_BASE}/crypto/sha1-pbkdf2.c 275 ${HOSTAP_SRC_BASE}/crypto/sha1-prf.c 276 ${HOSTAP_SRC_BASE}/crypto/sha256.c 277 ${HOSTAP_SRC_BASE}/crypto/sha256-internal.c 278 ${HOSTAP_SRC_BASE}/crypto/sha256-prf.c 279 ${HOSTAP_SRC_BASE}/crypto/sha384.c 280 ${HOSTAP_SRC_BASE}/crypto/sha384-internal.c 281 ${HOSTAP_SRC_BASE}/crypto/sha384-prf.c 282 ${HOSTAP_SRC_BASE}/crypto/sha512.c 283 ${HOSTAP_SRC_BASE}/crypto/sha512-internal.c 284 ${HOSTAP_SRC_BASE}/crypto/rc4.c 285) 286 287zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE 288 CONFIG_NO_WPA 289 CONFIG_CRYPTO_INTERNAL 290) 291 292zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WEP 293 CONFIG_WEP 294) 295 296zephyr_library_sources_ifndef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE 297 ${HOSTAP_SRC_BASE}/crypto/tls_none.c 298) 299 300zephyr_library_sources_ifndef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE 301 ${HOSTAP_SRC_BASE}/common/wpa_common.c 302 ${HOSTAP_SRC_BASE}/rsn_supp/wpa.c 303 ${HOSTAP_SRC_BASE}/rsn_supp/preauth.c 304 ${HOSTAP_SRC_BASE}/rsn_supp/wpa_ie.c 305) 306 307zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPA3 308 ${HOSTAP_SRC_BASE}/common/sae.c 309 ${HOSTAP_SRC_BASE}/common/dragonfly.c 310 311 ${HOSTAP_SRC_BASE}/crypto/dh_groups.c 312) 313 314zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPA3 315 CONFIG_SAE 316 CONFIG_ECC 317) 318 319zephyr_library_include_directories_ifndef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE 320 ${CMAKE_SOURCE_DIR} 321) 322 323zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P 324 ${WIFI_NM_WPA_SUPPLICANT_BASE}/p2p_supplicant.c 325 ${WIFI_NM_WPA_SUPPLICANT_BASE}/p2p_supplicant_sd.c 326 ${HOSTAP_SRC_BASE}/p2p/p2p.c 327 ${HOSTAP_SRC_BASE}/p2p/p2p_utils.c 328 ${HOSTAP_SRC_BASE}/p2p/p2p_parse.c 329 ${HOSTAP_SRC_BASE}/p2p/p2p_build.c 330 ${HOSTAP_SRC_BASE}/p2p/p2p_go_neg.c 331 ${HOSTAP_SRC_BASE}/p2p/p2p_sd.c 332 ${HOSTAP_SRC_BASE}/p2p/p2p_pd.c 333 ${HOSTAP_SRC_BASE}/p2p/p2p_invitation.c 334 ${HOSTAP_SRC_BASE}/p2p/p2p_dev_disc.c 335 ${HOSTAP_SRC_BASE}/p2p/p2p_group.c 336 ${HOSTAP_SRC_BASE}/ap/p2p_hostapd.c 337 ${HOSTAP_SRC_BASE}/common/gas.c 338 ${WIFI_NM_WPA_SUPPLICANT_BASE}/gas_query.c 339 ${WIFI_NM_WPA_SUPPLICANT_BASE}/offchannel.c 340) 341zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS 342 ${WIFI_NM_WPA_SUPPLICANT_BASE}/wps_supplicant.c 343 ${HOSTAP_SRC_BASE}/utils/uuid.c 344 ${HOSTAP_SRC_BASE}/eap_peer/eap_wsc.c 345 ${HOSTAP_SRC_BASE}/eap_common/eap_wsc_common.c 346 ${HOSTAP_SRC_BASE}/wps/wps.c 347 ${HOSTAP_SRC_BASE}/ap/wps_hostapd.c 348 ${HOSTAP_SRC_BASE}/wps/wps_common.c 349 ${HOSTAP_SRC_BASE}/wps/wps_attr_parse.c 350 ${HOSTAP_SRC_BASE}/wps/wps_attr_build.c 351 ${HOSTAP_SRC_BASE}/wps/wps_attr_process.c 352 ${HOSTAP_SRC_BASE}/wps/wps_dev_attr.c 353 ${HOSTAP_SRC_BASE}/wps/wps_enrollee.c 354 ${HOSTAP_SRC_BASE}/wps/wps_registrar.c 355 ${HOSTAP_SRC_BASE}/crypto/dh_groups.c 356) 357 358if(NOT CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT) 359# dh_group5 is only needed if we are not using mbedtls, as mbedtls provides 360# its own definition 361zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS 362 ${HOSTAP_SRC_BASE}/crypto/dh_group5.c 363) 364endif() 365 366zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P 367 CONFIG_P2P 368 CONFIG_GAS 369 CONFIG_OFFCHANNEL 370) 371 372zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_WPS 373 CONFIG_WPS 374 EAP_WSC 375) 376 377zephyr_library_sources_ifdef(CONFIG_WIFI_NM_HOSTAPD_WPS 378 ${HOSTAP_SRC_BASE}/eap_server/eap_server_wsc.c 379) 380 381zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_HOSTAPD_WPS 382 EAP_SERVER_WSC 383) 384 385zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE 386 ${HOSTAP_SRC_BASE}/eap_common/eap_common.c 387) 388 389zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE 390 IEEE8021X_EAPOL 391 EAP_IKEv2 392) 393 394zephyr_library_sources_ifdef(CONFIG_EAP_TLS 395 ${HOSTAP_SRC_BASE}/eap_peer/eap_tls.c 396 ${HOSTAP_SRC_BASE}/eap_peer/eap_tls_common.c 397) 398 399zephyr_library_compile_definitions_ifdef(CONFIG_EAP_TLS 400 EAP_TLS 401) 402 403zephyr_library_sources_ifdef(CONFIG_EAP_TTLS 404 ${HOSTAP_SRC_BASE}/eap_peer/eap_ttls.c 405) 406 407zephyr_library_compile_definitions_ifdef(CONFIG_EAP_TTLS 408 EAP_TTLS 409) 410 411zephyr_library_sources_ifdef(CONFIG_EAP_PEAP 412 ${HOSTAP_SRC_BASE}/eap_peer/eap_peap.c 413 ${HOSTAP_SRC_BASE}/eap_common/eap_peap_common.c 414) 415 416zephyr_library_compile_definitions_ifdef(CONFIG_EAP_PEAP 417 EAP_PEAP 418) 419 420zephyr_library_sources_ifdef(CONFIG_EAP_MD5 421 ${HOSTAP_SRC_BASE}/eap_peer/eap_md5.c 422) 423 424zephyr_library_compile_definitions_ifdef(CONFIG_EAP_MD5 425 EAP_MD5 426) 427 428zephyr_library_sources_ifdef(CONFIG_EAP_GTC 429 ${HOSTAP_SRC_BASE}/eap_peer/eap_gtc.c 430) 431 432zephyr_library_compile_definitions_ifdef(CONFIG_EAP_GTC 433 EAP_GTC 434) 435 436zephyr_library_sources_ifdef(CONFIG_EAP_MSCHAPV2 437 ${HOSTAP_SRC_BASE}/eap_peer/eap_mschapv2.c 438 ${HOSTAP_SRC_BASE}/eap_peer/mschapv2.c 439) 440 441zephyr_library_compile_definitions_ifdef(CONFIG_EAP_MSCHAPV2 442 EAP_MSCHAPv2 443) 444 445if(CONFIG_EAP_TTLS OR CONFIG_EAP_MSCHAPV2) 446 zephyr_library_sources(${HOSTAP_SRC_BASE}/eap_common/chap.c) 447endif() 448 449zephyr_library_sources_ifdef(CONFIG_EAP_LEAP 450 ${HOSTAP_SRC_BASE}/eap_peer/eap_leap.c 451) 452 453zephyr_library_compile_definitions_ifdef(CONFIG_EAP_LEAP 454 EAP_LEAP 455) 456 457zephyr_library_sources_ifdef(CONFIG_EAP_PSK 458 ${HOSTAP_SRC_BASE}/eap_peer/eap_psk.c 459 ${HOSTAP_SRC_BASE}/eap_common/eap_psk_common.c 460) 461 462zephyr_library_compile_definitions_ifdef(CONFIG_EAP_PSK 463 EAP_PSK 464) 465 466zephyr_library_sources_ifdef(CONFIG_EAP_PAX 467 ${HOSTAP_SRC_BASE}/eap_peer/eap_pax.c 468 ${HOSTAP_SRC_BASE}/eap_common/eap_pax_common.c 469) 470 471zephyr_library_compile_definitions_ifdef(CONFIG_EAP_PAX 472 EAP_PAX 473) 474 475zephyr_library_sources_ifdef(CONFIG_EAP_SAKE 476 ${HOSTAP_SRC_BASE}/eap_peer/eap_sake.c 477 ${HOSTAP_SRC_BASE}/eap_common/eap_sake_common.c 478) 479 480zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SAKE 481 EAP_SAKE 482) 483 484zephyr_library_sources_ifdef(CONFIG_EAP_GPSK 485 ${HOSTAP_SRC_BASE}/eap_peer/eap_gpsk.c 486 ${HOSTAP_SRC_BASE}/eap_common/eap_gpsk_common.c 487) 488 489zephyr_library_compile_definitions_ifdef(CONFIG_EAP_GPSK 490 EAP_GPSK 491) 492 493zephyr_library_sources_ifdef(CONFIG_EAP_PWD 494 ${HOSTAP_SRC_BASE}/eap_peer/eap_pwd.c 495 ${HOSTAP_SRC_BASE}/eap_common/eap_pwd_common.c 496) 497 498zephyr_library_compile_definitions_ifdef(CONFIG_EAP_PWD 499 EAP_PWD 500) 501 502zephyr_library_sources_ifdef(CONFIG_EAP_EKE 503 ${HOSTAP_SRC_BASE}/eap_peer/eap_eke.c 504 ${HOSTAP_SRC_BASE}/eap_common/eap_eke_common.c 505) 506 507zephyr_library_compile_definitions_ifdef(CONFIG_EAP_EKE 508 EAP_EKE 509) 510 511zephyr_library_sources_ifdef(CONFIG_EAP_IKEV2 512 ${HOSTAP_SRC_BASE}/eap_peer/eap_ikev2.c 513 ${HOSTAP_SRC_BASE}/eap_peer/ikev2.c 514 ${HOSTAP_SRC_BASE}/eap_common/eap_ikev2_common.c 515 ${HOSTAP_SRC_BASE}/eap_common/ikev2_common.c 516) 517 518zephyr_library_compile_definitions_ifdef(CONFIG_EAP_IKEV2 519 EAP_IKEV2 520) 521 522zephyr_library_sources_ifdef(CONFIG_EAP_SIM 523 ${HOSTAP_SRC_BASE}/eap_peer/eap_sim.c 524 ${HOSTAP_SRC_BASE}/eap_common/eap_sim_common.c 525) 526 527zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SIM 528 EAP_SIM 529) 530 531zephyr_library_sources_ifdef(CONFIG_EAP_AKA 532 ${HOSTAP_SRC_BASE}/eap_peer/eap_aka.c 533) 534 535zephyr_library_compile_definitions_ifdef(CONFIG_EAP_AKA 536 EAP_AKA 537) 538 539# Needs TLS1.3 and SESSION_TICKETS 540zephyr_library_sources_ifdef(CONFIG_EAP_FAST 541 ${HOSTAP_SRC_BASE}/eap_peer/eap_fast.c 542 ${HOSTAP_SRC_BASE}/eap_peer/eap_fast_pac.c 543 ${HOSTAP_SRC_BASE}/eap_common/eap_fast_common.c 544) 545 546zephyr_library_compile_definitions_ifdef(CONFIG_EAP_FAST 547 EAP_FAST 548) 549 550# Needs TLS1.3 and SESSION_TICKETS 551zephyr_library_sources_ifdef(CONFIG_EAP_FAST 552 ${HOSTAP_SRC_BASE}/eap_peer/eap_fast.c 553 ${HOSTAP_SRC_BASE}/eap_peer/eap_fast_pac.c 554 ${HOSTAP_SRC_BASE}/eap_common/eap_fast_common.c 555) 556 557zephyr_library_compile_definitions_ifdef(CONFIG_EAP_FAST 558 EAP_FAST 559) 560 561zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL 562 ${HOSTAP_SRC_BASE}/eapol_supp/eapol_supp_sm.c 563 ${HOSTAP_SRC_BASE}/eap_peer/eap.c 564 ${HOSTAP_SRC_BASE}/eap_peer/eap_methods.c 565 ${HOSTAP_SRC_BASE}/eap_common/eap_common.c 566) 567 568zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_EAPOL 569 IEEE8021X_EAPOL 570) 571 572zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_NW_SEL_RELIABILITY 573 CONFIG_NW_SEL_RELIABILITY 574) 575 576zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP 577 ${WIFI_NM_WPA_SUPPLICANT_BASE}/dpp_supplicant.c 578 ${WIFI_NM_WPA_SUPPLICANT_BASE}/offchannel.c 579 ${WIFI_NM_WPA_SUPPLICANT_BASE}/gas_query.c 580 581 ${HOSTAP_SRC_BASE}/ap/dpp_hostapd.c 582 ${HOSTAP_SRC_BASE}/ap/gas_query_ap.c 583 ${HOSTAP_SRC_BASE}/ap/gas_serv.c 584 585 ${HOSTAP_SRC_BASE}/common/dpp_tcp.c 586 ${HOSTAP_SRC_BASE}/common/dpp.c 587 ${HOSTAP_SRC_BASE}/common/dpp_pkex.c 588 ${HOSTAP_SRC_BASE}/common/dpp_crypto.c 589 ${HOSTAP_SRC_BASE}/common/dpp_auth.c 590 ${HOSTAP_SRC_BASE}/common/dpp_reconfig.c 591 ${HOSTAP_SRC_BASE}/common/gas_server.c 592 ${HOSTAP_SRC_BASE}/common/gas.c 593 ${HOSTAP_SRC_BASE}/common/dpp_backup.c 594 595 ${HOSTAP_SRC_BASE}/crypto/aes-siv.c 596 597 ${HOSTAP_SRC_BASE}/utils/json.c 598 ${HOSTAP_SRC_BASE}/utils/ip_addr.c 599 600 ${HOSTAP_SRC_BASE}/tls/asn1.c 601) 602 603zephyr_library_sources_ifdef(CONFIG_WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE 604 ${HOSTAP_SRC_BASE}/eap_server/eap_server_tls_common.c 605) 606 607zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE 608 WIFI_NM_HOSTAPD_CRYPTO_ENTERPRISE 609 EAP_TLS_FUNCS 610 EAP_SERVER 611) 612 613zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_IDENTITY 614 ${HOSTAP_SRC_BASE}/eap_server/eap_server_identity.c 615) 616 617zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_IDENTITY 618 EAP_SERVER_IDENTITY 619) 620 621 622zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_TLS 623 ${HOSTAP_SRC_BASE}/eap_server/eap_server_tls.c 624) 625 626zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_TLS 627 EAP_SERVER_TLS 628) 629 630zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_MD5 631 ${HOSTAP_SRC_BASE}/eap_server/eap_server_md5.c 632) 633 634zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_MD5 635 EAP_SERVER_MD5 636) 637 638zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_MSCHAPV2 639 ${HOSTAP_SRC_BASE}/eap_server/eap_server_mschapv2.c 640) 641 642zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_MSCHAPV2 643 EAP_SERVER_MSCHAPV2 644) 645 646zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_PEAP 647 ${HOSTAP_SRC_BASE}/eap_server/eap_server_peap.c 648) 649 650zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_PEAP 651 EAP_SERVER_PEAP 652) 653 654zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_GTC 655 ${HOSTAP_SRC_BASE}/eap_server/eap_server_gtc.c 656) 657 658zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_GTC 659 EAP_SERVER_GTC 660) 661 662zephyr_library_sources_ifdef(CONFIG_EAP_SERVER_TTLS 663 ${HOSTAP_SRC_BASE}/eap_server/eap_server_ttls.c 664) 665 666zephyr_library_compile_definitions_ifdef(CONFIG_EAP_SERVER_TTLS 667 EAP_SERVER_TTLS 668) 669 670if(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ALT) 671zephyr_include_directories( 672 ${HOSTAP_BASE}/port/mbedtls 673) 674 675zephyr_library_sources( 676 ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls_alt.c 677 ${HOSTAP_SRC_BASE}/crypto/rc4.c 678) 679 680zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_MBEDTLS_PSA 681 ${HOSTAP_BASE}/port/mbedtls/supp_psa_api.c 682) 683 684zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE 685 ${HOSTAP_SRC_BASE}/crypto/ms_funcs.c 686 ${HOSTAP_SRC_BASE}/crypto/aes-eax.c 687 ${HOSTAP_SRC_BASE}/crypto/md4-internal.c 688 ${HOSTAP_SRC_BASE}/crypto/sha1-internal.c 689 ${HOSTAP_SRC_BASE}/crypto/fips_prf_internal.c 690 ${HOSTAP_SRC_BASE}/crypto/milenage.c 691 ${HOSTAP_SRC_BASE}/crypto/tls_mbedtls_alt.c 692) 693 694zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_TEST 695 ${HOSTAP_SRC_BASE}/crypto/crypto_module_tests.c 696 ${HOSTAP_SRC_BASE}/crypto/fips_prf_internal.c 697 ${HOSTAP_SRC_BASE}/crypto/sha1-internal.c 698 ${HOSTAP_SRC_BASE}/crypto/sha1-tlsprf.c 699) 700endif() 701 702zephyr_library_link_libraries_ifndef(CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_NONE 703 mbedTLS) 704 705if(CONFIG_SAE_PWE_EARLY_EXIT) 706 message(WARNING "CONFIG_SAE_PWE_EARLY_EXIT is enabled, " 707 "this is not secure and is a workaround for low resource systems, " 708 "please use it carefully and do not use it production.") 709endif() 710 711endif() 712