From 795ba07d82bcbfa178c6e0bd10f0b5f62516acca Mon Sep 17 00:00:00 2001 From: Kyle Huey Date: Mon, 31 Jul 2023 07:55:04 -0700 Subject: [PATCH] Bump the DH key size to 256 bytes to avoid EINVAL on my kernel. --- src/test/keyctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/keyctl.c b/src/test/keyctl.c index 63e7559c463..1b488a95558 100644 --- a/src/test/keyctl.c +++ b/src/test/keyctl.c @@ -13,7 +13,7 @@ struct rr_keyctl_dh_params { }; int main(void) { - char buffer[192]; + char buffer[256]; char* data = "Test Data"; key_serial_t key = syscall(SYS_add_key, "user", "RR Test key", data, @@ -35,9 +35,9 @@ int main(void) { test_assert(0 == syscall(SYS_keyctl, KEYCTL_INVALIDATE, key)); #ifdef KEYCTL_DH_COMPUTE - uint8_t base[192] = { 1 }; + uint8_t base[256] = { 1 }; // 'prime' must be at least 1536 bits or we get EINVAL. - uint8_t prime[192] = { 7 }; // Not prime but we should be OK + uint8_t prime[256] = { 7 }; // Not prime but we should be OK uint8_t private = 1; // The world's worst private key base[191] = 'x';