summaryrefslogtreecommitdiff
path: root/auto_tests/encryptsave_test.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-08-10 13:52:40 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-08-10 13:52:40 +0100
commitfc330c1fa55003fa02928e27e146ab388fa65cdd (patch)
tree7d58d4554bcebd290c5601a4b94f655b33818701 /auto_tests/encryptsave_test.c
parent131522c335cbb8470871478724732b85bc1bf6e8 (diff)
Silence/fix some compiler warnings.
Some of these (like the incompatible pointers one) are really annoying for later refactoring.
Diffstat (limited to 'auto_tests/encryptsave_test.c')
-rw-r--r--auto_tests/encryptsave_test.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/auto_tests/encryptsave_test.c b/auto_tests/encryptsave_test.c
index 266dfe96..c970b756 100644
--- a/auto_tests/encryptsave_test.c
+++ b/auto_tests/encryptsave_test.c
@@ -41,13 +41,14 @@ void accept_friend_request(Tox *m, const uint8_t *public_key, const uint8_t *dat
41START_TEST(test_known_kdf) 41START_TEST(test_known_kdf)
42{ 42{
43 unsigned char out[crypto_box_BEFORENMBYTES]; 43 unsigned char out[crypto_box_BEFORENMBYTES];
44 crypto_pwhash_scryptsalsa208sha256(out, 44 int res = crypto_pwhash_scryptsalsa208sha256(out,
45 crypto_box_BEFORENMBYTES, 45 crypto_box_BEFORENMBYTES,
46 pw, 46 pw,
47 pwlen, 47 pwlen,
48 salt, 48 salt,
49 crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE * 8, 49 crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE * 8,
50 crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE); 50 crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE);
51 ck_assert_msg(res != -1, "crypto function failed");
51 ck_assert_msg(memcmp(out, known_key, crypto_box_BEFORENMBYTES) == 0, "derived key is wrong"); 52 ck_assert_msg(memcmp(out, known_key, crypto_box_BEFORENMBYTES) == 0, "derived key is wrong");
52} 53}
53END_TEST 54END_TEST