3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-20 12:39:25 +01:00

wscutil: Handle Key Wrap Authenticator

This commit is contained in:
Denis Kenzior 2016-08-30 13:30:06 -05:00
parent 7810a45a9c
commit 642804f9d7

View File

@ -186,6 +186,15 @@ static bool extract_hash(struct wsc_attr_iter *iter, void *data)
return true;
}
static bool extract_authenticator(struct wsc_attr_iter *iter, void *data)
{
if (wsc_attr_iter_get_length(iter) != 8)
return false;
memcpy(data, wsc_attr_iter_get_data(iter), 8);
return true;
}
static bool extract_ascii_string(struct wsc_attr_iter *iter, void *data,
unsigned int max_len)
{
@ -265,15 +274,6 @@ static bool extract_association_state(struct wsc_attr_iter *iter, void *data)
return true;
}
static bool extract_authenticator(struct wsc_attr_iter *iter, void *data)
{
if (wsc_attr_iter_get_length(iter) != 8)
return false;
memcpy(data, wsc_attr_iter_get_data(iter), 8);
return true;
}
static bool extract_configuration_error(struct wsc_attr_iter *iter, void *data)
{
enum wsc_configuration_error *out = data;
@ -515,6 +515,8 @@ static attr_handler handler_for_type(enum wsc_attr type)
return extract_uint16;
case WSC_ATTR_ENROLLEE_NONCE:
return extract_nonce;
case WSC_ATTR_KEY_WRAP_AUTHENTICATOR:
return extract_authenticator;
case WSC_ATTR_MAC_ADDRESS:
return extract_mac_address;
case WSC_ATTR_MANUFACTURER: