Skip to content

Commit

Permalink
Merge pull request #908
Browse files Browse the repository at this point in the history
wireless: Fix WPA_PSK given as 64byte long hex string
  • Loading branch information
mtomaschewski committed Apr 1, 2022
2 parents 3df9735 + 4879cdb commit 1b57397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ ni_wireless_wpa_net_format_psk(ni_wpa_net_properties_t *properties, const ni_wir
return FALSE;

if (ni_string_len(net->wpa_psk.passphrase) == 64){
if(ni_parse_hex(net->wpa_psk.passphrase, data, sizeof(data)) != sizeof(data)){
if(ni_parse_hex_data(net->wpa_psk.passphrase, data, sizeof(data), NULL) != sizeof(data)){
ni_error("Failed to parse wpa_psk");
return FALSE;
}
Expand Down

0 comments on commit 1b57397

Please sign in to comment.