Skip to content

Commit 298a209

Browse files
D-Trivenirlubos
authored andcommitted
modules: wfa-qt: Fix server certificate validation
Add changes to read parameters required to validate the server certificate. Also, set the PMF option as required for the realted testcase. Fixes SHEL-3880. Signed-off-by: Triveni Danda <[email protected]>
1 parent 5ec2fa9 commit 298a209

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

modules/wfa-qt/src/indigo_api_callback_dut.c

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,8 +1864,16 @@ static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapp
18641864
"SET_NETWORK 0 psk \"%s\"", psk);
18651865
ret = run_qt_command(buffer);
18661866
CHECK_RET();
1867-
ret = run_qt_command("SET_NETWORK 0 ieee80211w 1");
1868-
CHECK_RET();
1867+
tlv = find_wrapper_tlv_by_id(req, TLV_STA_IEEE80211_W);
1868+
if (tlv) {
1869+
CHECK_SNPRINTF(buffer, sizeof(buffer), ret,
1870+
"SET_NETWORK 0 ieee80211w %s", tlv->value);
1871+
ret = run_qt_command(buffer);
1872+
CHECK_RET();
1873+
} else {
1874+
ret = run_qt_command("SET_NETWORK 0 ieee80211w 0");
1875+
CHECK_RET();
1876+
}
18691877
} else if (strstr(tlv->value, "SAE")) {
18701878
CHECK_SNPRINTF(buffer, sizeof(buffer), ret,
18711879
"SET_NETWORK 0 sae_password \"%s\"", psk);
@@ -1881,6 +1889,11 @@ static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapp
18811889

18821890
process_certificates();
18831891

1892+
if (strstr(tlv->value, "WPA-EAP-SHA256")) {
1893+
ret = run_qt_command("SET_NETWORK 0 ieee80211w 2");
1894+
CHECK_RET();
1895+
}
1896+
18841897
struct {
18851898
int tlv_id;
18861899
const char *cmd_fmt;
@@ -1911,6 +1924,15 @@ static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapp
19111924
{ TLV_PASSWORD,
19121925
"SET_NETWORK 0 password \"%s\"",
19131926
NULL, true },
1927+
{ TLV_STA_IEEE80211_W,
1928+
"SET_NETWORK 0 ieee80211w %s",
1929+
NULL, true },
1930+
{ TLV_DOMAIN_MATCH,
1931+
"SET_NETWORK 0 domain_match \"%s\"",
1932+
NULL, true },
1933+
{ TLV_DOMAIN_SUFFIX_MATCH,
1934+
"SET_NETWORK 0 domain_suffix_match \"%s\"",
1935+
NULL, true },
19141936
};
19151937

19161938
for (size_t i = 0; i < ARRAY_SIZE(config_cmds); i++) {
@@ -1930,10 +1952,6 @@ static int configure_sta_handler(struct packet_wrapper *req, struct packet_wrapp
19301952
}
19311953
}
19321954

1933-
ret = run_qt_command(buffer);
1934-
CHECK_RET();
1935-
ret = run_qt_command("SET_NETWORK 0 ieee80211w 1");
1936-
CHECK_RET();
19371955
}
19381956
#else
19391957
}

0 commit comments

Comments
 (0)