diff options
author | Gaurav Shah <gauravsh@chromium.org> | 2010-03-24 13:48:55 -0700 |
---|---|---|
committer | Gaurav Shah <gauravsh@chromium.org> | 2010-03-24 13:48:55 -0700 |
commit | ce0cc30e55987f3faac9f9bacdf5d66c86ede08e (patch) | |
tree | b0b5995e83d17b3328b062f37a1dd7f55376a336 /tests/test_common.h | |
parent | 1e5669376388c46e924d43d1bfe6406347493a86 (diff) | |
download | vboot-ce0cc30e55987f3faac9f9bacdf5d66c86ede08e.tar.gz |
VBoot Reference: Add version checking to for preventing rollbacks.
This CL adds a new function VerifyFirmwareDriver_f() means to be a part of the RO firmware which determine which copy of the firmware to boot from. It is meant to ensure that a particular firmware is only booted if 1) it verifies successfully, 2) its version is newer or equal to current stored version. In addition, the driver function also updates the stored version if needed.
Currently I am using the TLCL API with stub calls, (in fact, most of the TPM interaction is done in rollback_index.c which implements the actual version query/update API) used by the firmware.
Review URL: http://codereview.chromium.org/1241002
Diffstat (limited to 'tests/test_common.h')
-rw-r--r-- | tests/test_common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_common.h b/tests/test_common.h new file mode 100644 index 00000000..9fa3eecf --- /dev/null +++ b/tests/test_common.h @@ -0,0 +1,13 @@ +/* Copyright (c) 2010 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. + * + */ + +#ifndef VBOOT_REFERENCE_TEST_COMMON_H_ +#define VBOOT_REFERENCE_TEST_COMMON_H_ + +int TEST_EQ(int result, int expected_result, char* testname); +extern int gTestSuccess; + +#endif /* VBOOT_REFERENCE_TEST_COMMON_H_ */ |