diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-03-30 15:28:57 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-03-30 15:58:30 +0200 |
commit | d0f463048f12854a4901386c5fb446cbdc6fd51c (patch) | |
tree | 4600e3a35460df4bd36071cba1ba162f92810050 /src/config.c | |
parent | b0520f85366095675ff59c112f2060ad9ce7df80 (diff) |
curve25519: protect against potential invalid point attacks
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index c420f7c..f307ff6 100644 --- a/src/config.c +++ b/src/config.c @@ -159,7 +159,7 @@ int config_set_device(struct wireguard_device *wg, void __user *user_device) u8 public_key[NOISE_PUBLIC_KEY_LEN] = { 0 }; struct wireguard_peer *peer; /* We remove before setting, to prevent race, which means doing two 25519-genpub ops. */ - curve25519_generate_public(public_key, in_device.private_key); + bool unused __attribute((unused)) = curve25519_generate_public(public_key, in_device.private_key); peer = pubkey_hashtable_lookup(&wg->peer_hashtable, public_key); if (peer) { peer_put(peer); |