Make the arguments to FIPS check_test consistent.

Change-Id: Ibd6b9b12b3b622f67f69da5c2add8b1b040882f1
Reviewed-on: https://boringssl-review.googlesource.com/15344
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
Adam Langley 2017-04-20 16:07:10 -07:00 committed by CQ bot account: commit-bot@chromium.org
parent 3975ecffc2
commit 778e5cedf0

View File

@ -54,13 +54,13 @@ static void hexdump(const uint8_t *in, size_t len) {
}
}
static int check_test(const void *actual, const void *expected,
static int check_test(const void *expected, const void *actual,
size_t expected_len, const char *name) {
if (OPENSSL_memcmp(actual, expected, expected_len) != 0) {
printf("%s failed.\nExpected: ", name);
hexdump(actual, expected_len);
printf("\nCalculated: ");
hexdump(expected, expected_len);
printf("\nCalculated: ");
hexdump(actual, expected_len);
printf("\n");
return 0;
}
@ -107,7 +107,7 @@ static void BORINGSSL_bcm_power_on_self_test(void) {
const uint8_t *const expected =
(const uint8_t *)BORINGSSL_bcm_text_dummy_hash;
if (!check_test(result, expected, sizeof(result), "FIPS integrity test")) {
if (!check_test(expected, result, sizeof(result), "FIPS integrity test")) {
goto err;
}
#endif