The final version of the syscall that went in to kernel 4.7 added a
reserved arg to the KEYCTL_DH_COMPUTE syscall. In the future, this arg
will be used to optionally specify a key derivation function. For now,
it's needed so the system call doesn't return -1 (errno == EINVAL)
every time.
---
ell/key.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ell/key.c b/ell/key.c
index adeac04..e6ae92a 100644
--- a/ell/key.c
+++ b/ell/key.c
@@ -99,7 +99,8 @@ static long kernel_dh_compute(int32_t private, int32_t prime, int32_t
base,
.prime = prime,
.base = base };
- return syscall(__NR_keyctl, KEYCTL_DH_COMPUTE, ¶ms, payload, len);
+ return syscall(__NR_keyctl, KEYCTL_DH_COMPUTE, ¶ms, payload, len,
+ NULL);
}
static bool setup_internal_keyring(void)
--
2.9.0