Skip to content

Commit

Permalink
net: lib: wifi_mgmt_ext: Add entries for phase2 certs
Browse files Browse the repository at this point in the history
Add entries for phase2 certificates in connection parameters.

Signed-off-by: Ravi Dondaputi <[email protected]>
  • Loading branch information
rado17 authored and krish2718 committed Oct 24, 2024
1 parent 64578b8 commit 649056d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ static const char client_cert_test[] = {
static const char client_key_test[] = {
#include <wifi_enterprise_test_certs/client-key.pem.inc>
'\0'};

static const char ca_cert2_test[] = {
#include <wifi_enterprise_test_certs/ca2.pem.inc>
'\0'};

static const char client_cert2_test[] = {
#include <wifi_enterprise_test_certs/client2.pem.inc>
'\0'};

static const char client_key2_test[] = {
#include <wifi_enterprise_test_certs/client-key2.pem.inc>
'\0'};
#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */

static int __stored_creds_to_params(struct wifi_credentials_personal *creds,
Expand Down Expand Up @@ -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, &params, sizeof(params))) {
LOG_ERR("Set enterprise credentials failed\n");
Expand Down

0 comments on commit 649056d

Please sign in to comment.