wg: Improve the return types of noise handshake functions
commite44138a780183f2ea032b3371adb0b33a3b91e2a
authorAaron LI <aly@aaronly.me>
Sat, 6 Jan 2024 15:41:56 +0000 (6 23:41 +0800)
committerAaron LI <aly@aaronly.me>
Thu, 8 Feb 2024 06:44:47 +0000 (8 14:44 +0800)
tree9ef60e45832f1dc55ea2385e016d2179ecf24797
parentf0424a0dd15923767442beb8f47eb358d21cc9f8
wg: Improve the return types of noise handshake functions

- Change noise_create_initiation() and noise_create_response() to return
  a boolean.
- Change noise_consume_initiation() and noise_consume_response() to
  return the corresponding remote, with another reference acquired.
  As a result, the 'struct noise_remote **' parameter is obsolete and
  removed.
- Update the callers in if_wg.c accordingly.

Referred to Linux's version.
sys/net/wg/if_wg.c
sys/net/wg/wg_noise.c
sys/net/wg/wg_noise.h