Propagate use of uint64_t to more functions that may need to deal with arbitrary length data.
This CL fixes some functions to use uint64_t that I missed the first time around. It ended up requiring some minor changes to how some of the helper functions work (StatefulMemcpy*()).
Also adds new tests to make sure that reference code can verify/process big firmware and kernel images.
BUG=670
TEST=Adds some new, old ones still pass.
Review URL: http://codereview.chromium.org/1519008
diff --git a/tests/kernel_rollback_tests.c b/tests/kernel_rollback_tests.c
index c956300..eafbaaa 100644
--- a/tests/kernel_rollback_tests.c
+++ b/tests/kernel_rollback_tests.c
@@ -15,12 +15,14 @@
#include "test_common.h"
#include "utility.h"
+const char* kFirmwareKeyPublicFile = "testkeys/key_rsa1024.keyb";
+
/* Tests that check for correctness of the VerifyFirmwareDriver_f() logic
* and rollback prevention. */
void VerifyKernelDriverTest(void) {
uint64_t len;
- uint8_t* firmware_key_pub = BufferFromFile("testkeys/key_rsa1024.keyb",
- &len);
+ uint8_t* firmware_key_pub = BufferFromFile(kFirmwareKeyPublicFile, &len);
+
/* Initialize kernel blobs, including their associated parition
* table attributed. */
kernel_entry valid_kernelA = {