diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 61da86cdf..a451d9d1d 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -5457,9 +5457,11 @@ int curve25519_test(void) return -1003; /* find shared secret key */ + x = sizeof(sharedA); if (wc_curve25519_shared_secret(&userA, &userB, sharedA, &x) != 0) return -1004; + y = sizeof(sharedB); if (wc_curve25519_shared_secret(&userB, &userA, sharedB, &y) != 0) return -1005; @@ -5471,6 +5473,7 @@ int curve25519_test(void) return -1007; /* export a public key and import it for another user */ + x = sizeof(exportBuf); if (wc_curve25519_export_public(&userA, exportBuf, &x) != 0) return -1008; @@ -5479,6 +5482,7 @@ int curve25519_test(void) /* test shared key after importing a public key */ XMEMSET(sharedB, 0, sizeof(sharedB)); + y = sizeof(sharedB); if (wc_curve25519_shared_secret(&userB, &pubKey, sharedB, &y) != 0) return -1010; @@ -5496,6 +5500,7 @@ int curve25519_test(void) /* test against known test vector */ XMEMSET(sharedB, 0, sizeof(sharedB)); + y = sizeof(sharedB); if (wc_curve25519_shared_secret(&userA, &userB, sharedB, &y) != 0) return -1014; @@ -5504,6 +5509,7 @@ int curve25519_test(void) /* test swaping roles of keys and generating same shared key */ XMEMSET(sharedB, 0, sizeof(sharedB)); + y = sizeof(sharedB); if (wc_curve25519_shared_secret(&userB, &userA, sharedB, &y) != 0) return -1016; @@ -5518,9 +5524,11 @@ int curve25519_test(void) if (wc_curve25519_make_key(&rng, 32, &userB) != 0) return -1019; + x = sizeof(sharedA); if (wc_curve25519_shared_secret(&userA, &userB, sharedA, &x) != 0) return -1020; + y = sizeof(sharedB); if (wc_curve25519_shared_secret(&userB, &userA, sharedB, &y) != 0) return -1021;