mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
eap-wsc: optionally load IV1 & IV2 for debugging
When we send M5 & M7, we need to generate a random IV. For testing purposes, the IV can be provided in settings, otherwise it will be generated randomly.
This commit is contained in:
parent
1820d7c33e
commit
c0de9d1790
@ -70,6 +70,8 @@ struct eap_wsc_state {
|
||||
char *device_password;
|
||||
uint8_t e_snonce1[16];
|
||||
uint8_t e_snonce2[16];
|
||||
uint8_t iv1[16];
|
||||
uint8_t iv2[16];
|
||||
uint8_t psk1[16];
|
||||
uint8_t psk2[16];
|
||||
uint8_t r_hash2[32];
|
||||
@ -781,6 +783,12 @@ static bool eap_wsc_load_settings(struct eap_state *eap,
|
||||
if (!load_hexencoded(settings, "E-SNonce2", wsc->e_snonce2, 16))
|
||||
l_getrandom(wsc->e_snonce2, 16);
|
||||
|
||||
if (!load_hexencoded(settings, "IV1", wsc->iv1, 16))
|
||||
l_getrandom(wsc->iv1, 16);
|
||||
|
||||
if (!load_hexencoded(settings, "IV2", wsc->iv2, 16))
|
||||
l_getrandom(wsc->iv2, 16);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user