mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-30 14:22:37 +01:00
wscutil: Add e_hash 1 & 2 extractor
This commit is contained in:
parent
b80254375b
commit
dc310bfc49
@ -177,6 +177,15 @@ static bool extract_uuid(struct wsc_attr_iter *iter, void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool extract_e_hash(struct wsc_attr_iter *iter, void *data)
|
||||
{
|
||||
if (wsc_attr_iter_get_length(iter) != 32)
|
||||
return false;
|
||||
|
||||
memcpy(data, wsc_attr_iter_get_data(iter), 32);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool extract_ascii_string(struct wsc_attr_iter *iter, void *data,
|
||||
unsigned int max_len)
|
||||
{
|
||||
@ -487,6 +496,9 @@ static attr_handler handler_for_type(enum wsc_attr type)
|
||||
return extract_device_name;
|
||||
case WSC_ATTR_DEVICE_PASSWORD_ID:
|
||||
return extract_device_password_id;
|
||||
case WSC_ATTR_E_HASH1:
|
||||
case WSC_ATTR_E_HASH2:
|
||||
return extract_e_hash;
|
||||
case WSC_ATTR_ENCRYPTION_TYPE_FLAGS:
|
||||
return extract_uint16;
|
||||
case WSC_ATTR_ENROLLEE_NONCE:
|
||||
|
Loading…
Reference in New Issue
Block a user