summaryrefslogtreecommitdiff
path: root/tests/sha_benchmark.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-06-27 10:49:11 -0700
committerRandall Spangler <rspangler@chromium.org>2011-06-27 13:30:41 -0700
commit32a6526d25d4bf9a1c137fc3d275d1c68935d184 (patch)
tree8659c56a4129ff40f631670b7fd3b94bda73fe20 /tests/sha_benchmark.c
parent7adcc60e6f5f6db081b9ad6e02288335502a0d77 (diff)
downloadvboot-32a6526d25d4bf9a1c137fc3d275d1c68935d184.tar.gz
Verified boot wrapper - add stub implementations for host
This is part 2 of the wrapper API refactor. It adds stub implementations for the host, and changes the host-side utilities to use them. Firmware implementation is unchanged in this CL (other than a few updates to macros). BUG=chromium_os:16997 TEST=make && make runtests Change-Id: I63989bd11de1f2239ddae256beaccd31bfb5acef Reviewed-on: http://gerrit.chromium.org/gerrit/3256 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/sha_benchmark.c')
-rw-r--r--tests/sha_benchmark.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sha_benchmark.c b/tests/sha_benchmark.c
index 8532ffa8..9f4da367 100644
--- a/tests/sha_benchmark.c
+++ b/tests/sha_benchmark.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -7,8 +7,8 @@
#include <stdlib.h>
#include "cryptolib.h"
+#include "host_common.h"
#include "timer_utils.h"
-#include "utility.h"
#define NUM_HASH_ALGORITHMS 3
#define TEST_BUFFER_SIZE 4000000
@@ -30,8 +30,8 @@ int main(int argc, char* argv[]) {
int i;
double speed;
uint32_t msecs;
- uint8_t* buffer = (uint8_t*) Malloc(TEST_BUFFER_SIZE);
- uint8_t* digest = (uint8_t*) Malloc(SHA512_DIGEST_SIZE); /* Maximum size of
+ uint8_t* buffer = (uint8_t*) malloc(TEST_BUFFER_SIZE);
+ uint8_t* digest = (uint8_t*) malloc(SHA512_DIGEST_SIZE); /* Maximum size of
* the digest. */
ClockTimerState ct;
@@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {
hash_functions[i].description, speed);
}
- Free(digest);
- Free(buffer);
+ free(digest);
+ free(buffer);
return 0;
}