mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 10:39:23 +01:00
wscutil: Add wsc_parse_m7_encrypted_settings
This commit is contained in:
parent
9353da8bf3
commit
8df0f9fa28
@ -510,6 +510,7 @@ static attr_handler handler_for_type(enum wsc_attr type)
|
|||||||
case WSC_ATTR_E_HASH2:
|
case WSC_ATTR_E_HASH2:
|
||||||
return extract_hash;
|
return extract_hash;
|
||||||
case WSC_ATTR_E_SNONCE1:
|
case WSC_ATTR_E_SNONCE1:
|
||||||
|
case WSC_ATTR_E_SNONCE2:
|
||||||
return extract_nonce;
|
return extract_nonce;
|
||||||
case WSC_ATTR_ENCRYPTED_SETTINGS:
|
case WSC_ATTR_ENCRYPTED_SETTINGS:
|
||||||
return extract_encrypted_settings;
|
return extract_encrypted_settings;
|
||||||
@ -1267,6 +1268,17 @@ int wsc_parse_m7(const uint8_t *pdu, uint32_t len, struct wsc_m7 *out,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wsc_parse_m7_encrypted_settings(const uint8_t *pdu, uint32_t len,
|
||||||
|
struct wsc_m7_encrypted_settings *out)
|
||||||
|
{
|
||||||
|
memset(out, 0, sizeof(*out));
|
||||||
|
|
||||||
|
return wsc_parse_attrs(pdu, len, NULL, NULL,
|
||||||
|
WSC_ATTR_KEY_WRAP_AUTHENTICATOR, out->authenticator,
|
||||||
|
REQUIRED(E_SNONCE2, out->e_snonce2),
|
||||||
|
WSC_ATTR_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
int wsc_parse_nack(const uint8_t *pdu, uint32_t len, struct wsc_nack *out)
|
int wsc_parse_nack(const uint8_t *pdu, uint32_t len, struct wsc_nack *out)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -487,6 +487,11 @@ struct wsc_m7 {
|
|||||||
uint8_t authenticator[8];
|
uint8_t authenticator[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct wsc_m7_encrypted_settings {
|
||||||
|
uint8_t e_snonce2[16];
|
||||||
|
uint8_t authenticator[8];
|
||||||
|
};
|
||||||
|
|
||||||
struct wsc_nack {
|
struct wsc_nack {
|
||||||
bool version2;
|
bool version2;
|
||||||
uint8_t enrollee_nonce[16];
|
uint8_t enrollee_nonce[16];
|
||||||
@ -518,6 +523,8 @@ int wsc_parse_m6_encrypted_settings(const uint8_t *pdu, uint32_t len,
|
|||||||
struct wsc_m6_encrypted_settings *out);
|
struct wsc_m6_encrypted_settings *out);
|
||||||
int wsc_parse_m7(const uint8_t *pdu, uint32_t len, struct wsc_m7 *out,
|
int wsc_parse_m7(const uint8_t *pdu, uint32_t len, struct wsc_m7 *out,
|
||||||
struct iovec *out_encrypted);
|
struct iovec *out_encrypted);
|
||||||
|
int wsc_parse_m7_encrypted_settings(const uint8_t *pdu, uint32_t len,
|
||||||
|
struct wsc_m7_encrypted_settings *out);
|
||||||
|
|
||||||
int wsc_parse_nack(const uint8_t *pdu, uint32_t len, struct wsc_nack *out);
|
int wsc_parse_nack(const uint8_t *pdu, uint32_t len, struct wsc_nack *out);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user