commit f0e3d92d00c45f98a7e7e225528ae1522a249dec
parent 03b99ba0d5e73c1c1b6608f84385d7d81bdfc8c5
Author: Denis Kenzior <denkenz@gmail.com>
Date: Sun, 11 Jul 2021 23:26:21 -0500
sae: Fix sae_cn endianness issue
send_confirm was always passed in using host byte-order, but the hash
should be ran over send_confirm in LE order.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/sae.c b/src/sae.c
@@ -164,6 +164,8 @@ static bool sae_cn(const uint8_t *kck, uint16_t send_confirm,
if (!hmac)
return false;
+ send_confirm = L_CPU_TO_LE16(send_confirm);
+
iov[0].iov_base = &send_confirm;
iov[0].iov_len = 2;
iov[1].iov_base = (void *) s1;