mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
wscutil: Add wsc_build_m7_encrypted_settings
This commit is contained in:
parent
8df0f9fa28
commit
9bb4ba42dd
@ -1554,6 +1554,13 @@ static void build_e_snonce1(struct wsc_attr_builder *builder,
|
||||
wsc_attr_builder_put_bytes(builder, nonce, 16);
|
||||
}
|
||||
|
||||
static void build_e_snonce2(struct wsc_attr_builder *builder,
|
||||
const uint8_t *nonce)
|
||||
{
|
||||
wsc_attr_builder_start_attr(builder, WSC_ATTR_E_SNONCE2);
|
||||
wsc_attr_builder_put_bytes(builder, nonce, 16);
|
||||
}
|
||||
|
||||
static void build_enrollee_nonce(struct wsc_attr_builder *builder,
|
||||
const uint8_t *nonce)
|
||||
{
|
||||
@ -2008,6 +2015,19 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint8_t *wsc_build_m7_encrypted_settings(
|
||||
const struct wsc_m7_encrypted_settings *in,
|
||||
size_t *out_len)
|
||||
{
|
||||
struct wsc_attr_builder *builder;
|
||||
|
||||
builder = wsc_attr_builder_new(256);
|
||||
build_e_snonce2(builder, in->e_snonce2);
|
||||
build_key_wrap_authenticator(builder, in->authenticator);
|
||||
|
||||
return wsc_attr_builder_free(builder, false, out_len);
|
||||
}
|
||||
|
||||
uint8_t *wsc_build_nack(const struct wsc_nack *nack, size_t *out_len)
|
||||
{
|
||||
struct wsc_attr_builder *builder;
|
||||
|
@ -550,6 +550,9 @@ uint8_t *wsc_build_m6_encrypted_settings(
|
||||
size_t *out_len);
|
||||
uint8_t *wsc_build_m7(const struct wsc_m7 *m7, const uint8_t *encrypted,
|
||||
size_t encrypted_len, size_t *out_len);
|
||||
uint8_t *wsc_build_m7_encrypted_settings(
|
||||
const struct wsc_m7_encrypted_settings *in,
|
||||
size_t *out_len);
|
||||
|
||||
uint8_t *wsc_build_nack(const struct wsc_nack *nack, size_t *out_len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user