mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-20 09:34:06 +01:00
wscutil: Add wsc_m6_build_encrypted_settings
This commit is contained in:
parent
3719e78094
commit
11550b2756
@ -1629,6 +1629,13 @@ static void build_r_snonce1(struct wsc_attr_builder *builder,
|
||||
wsc_attr_builder_put_bytes(builder, nonce, 16);
|
||||
}
|
||||
|
||||
static void build_r_snonce2(struct wsc_attr_builder *builder,
|
||||
const uint8_t *nonce)
|
||||
{
|
||||
wsc_attr_builder_start_attr(builder, WSC_ATTR_R_SNONCE2);
|
||||
wsc_attr_builder_put_bytes(builder, nonce, 16);
|
||||
}
|
||||
|
||||
static void build_serial_number(struct wsc_attr_builder *builder,
|
||||
const char *serial_number)
|
||||
{
|
||||
@ -1923,6 +1930,19 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint8_t *wsc_build_m6_encrypted_settings(
|
||||
const struct wsc_m6_encrypted_settings *in,
|
||||
size_t *out_len)
|
||||
{
|
||||
struct wsc_attr_builder *builder;
|
||||
|
||||
builder = wsc_attr_builder_new(256);
|
||||
build_r_snonce2(builder, in->r_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;
|
||||
|
@ -530,6 +530,9 @@ uint8_t *wsc_build_m5_encrypted_settings(
|
||||
size_t *out_len);
|
||||
uint8_t *wsc_build_m6(const struct wsc_m6 *m6, const uint8_t *encrypted,
|
||||
size_t encrypted_len, size_t *out_len);
|
||||
uint8_t *wsc_build_m6_encrypted_settings(
|
||||
const struct wsc_m6_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