diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-24 03:35:35 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-30 18:07:28 +0200 |
commit | fd1e80d9f4bad1805d801fc4501d86807c93a9ec (patch) | |
tree | a2337856c5f12a093f08bf39717227921f6bfa36 /src/config.c | |
parent | 499d37da4f1602ca83315efb8741347d02899c7b (diff) |
noise: precompute static-static ECDH operation
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 46ee2f1..c3fe154 100644 --- a/src/config.c +++ b/src/config.c @@ -182,8 +182,11 @@ int config_set_device(struct wireguard_device *wg, void __user *user_device) modified_static_identity = true; } - if (modified_static_identity) + if (modified_static_identity) { + if (peer_for_each_unlocked(wg, noise_precompute_static_static, NULL) < 0) + noise_set_static_identity_private_key(&wg->static_identity, NULL); cookie_checker_precompute_device_keys(&wg->cookie_checker); + } for (i = 0, offset = 0, user_peer = user_device + sizeof(struct wgdevice); i < in_device.num_peers; ++i, user_peer += offset) { ret = set_peer(wg, user_peer, &offset); |