mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-02 09:22:32 +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;
|
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,
|
static bool extract_ascii_string(struct wsc_attr_iter *iter, void *data,
|
||||||
unsigned int max_len)
|
unsigned int max_len)
|
||||||
{
|
{
|
||||||
@ -487,6 +496,9 @@ static attr_handler handler_for_type(enum wsc_attr type)
|
|||||||
return extract_device_name;
|
return extract_device_name;
|
||||||
case WSC_ATTR_DEVICE_PASSWORD_ID:
|
case WSC_ATTR_DEVICE_PASSWORD_ID:
|
||||||
return extract_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:
|
case WSC_ATTR_ENCRYPTION_TYPE_FLAGS:
|
||||||
return extract_uint16;
|
return extract_uint16;
|
||||||
case WSC_ATTR_ENROLLEE_NONCE:
|
case WSC_ATTR_ENROLLEE_NONCE:
|
||||||
|
Loading…
Reference in New Issue
Block a user