From d036325af5dd69b75bb27f4ed7c1b01b2375186c Mon Sep 17 00:00:00 2001 From: Ravi Dondaputi Date: Thu, 24 Oct 2024 17:46:45 +0530 Subject: [PATCH] net: lib: wifi_mgmt_ext: Add entries for phase2 certs Add entries for phase2 certificates in connection parameters. Signed-off-by: Ravi Dondaputi --- subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c b/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c index 6b4774abc190..41d78cebdc06 100644 --- a/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c +++ b/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c @@ -37,6 +37,18 @@ static const char client_cert_test[] = { static const char client_key_test[] = { #include '\0'}; + +static const char ca_cert2_test[] = { + #include + '\0'}; + +static const char client_cert2_test[] = { + #include + '\0'}; + +static const char client_key2_test[] = { + #include + '\0'}; #endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ static int __stored_creds_to_params(struct wifi_credentials_personal *creds, @@ -184,6 +196,12 @@ static int wifi_set_enterprise_creds(struct net_if *iface) params.client_cert_len = ARRAY_SIZE(client_cert_test); params.client_key = (uint8_t *)client_key_test; params.client_key_len = ARRAY_SIZE(client_key_test); + params.ca_cert2 = (uint8_t *)ca_cert2_test; + params.ca_cert2_len = ARRAY_SIZE(ca_cert2_test); + params.client_cert2 = (uint8_t *)client_cert2_test; + params.client_cert2_len = ARRAY_SIZE(client_cert2_test); + params.client_key2 = (uint8_t *)client_key2_test; + params.client_key2_len = ARRAY_SIZE(client_key2_test); if (net_mgmt(NET_REQUEST_WIFI_ENTERPRISE_CREDS, iface, ¶ms, sizeof(params))) { LOG_ERR("Set enterprise credentials failed\n");