| OLD | NEW |
| 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 * | 4 * |
| 5 * Tests for checking firmware rollback-prevention logic. | 5 * Tests for checking firmware rollback-prevention logic. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| 11 #include "cryptolib.h" |
| 11 #include "file_keys.h" | 12 #include "file_keys.h" |
| 12 #include "firmware_image.h" | 13 #include "firmware_image.h" |
| 13 #include "rsa_utility.h" | |
| 14 #include "utility.h" | 14 #include "utility.h" |
| 15 #include "rollback_index.h" | 15 #include "rollback_index.h" |
| 16 #include "test_common.h" | 16 #include "test_common.h" |
| 17 | 17 |
| 18 const char* kRootKeyPublicFile = "testkeys/key_rsa8192.keyb"; | 18 const char* kRootKeyPublicFile = "testkeys/key_rsa8192.keyb"; |
| 19 | 19 |
| 20 /* Tests that check for correctness of the VerifyFirmwareDriver_f() logic | 20 /* Tests that check for correctness of the VerifyFirmwareDriver_f() logic |
| 21 * and rollback prevention. */ | 21 * and rollback prevention. */ |
| 22 void VerifyFirmwareDriverTest(void) { | 22 void VerifyFirmwareDriverTest(void) { |
| 23 uint8_t* valid_firmwareA = NULL; | 23 uint8_t* valid_firmwareA = NULL; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 Free(corrupt_firmwareB); | 70 Free(corrupt_firmwareB); |
| 71 } | 71 } |
| 72 | 72 |
| 73 int main(int argc, char* argv[]) { | 73 int main(int argc, char* argv[]) { |
| 74 int error_code = 0; | 74 int error_code = 0; |
| 75 VerifyFirmwareDriverTest(); | 75 VerifyFirmwareDriverTest(); |
| 76 if (!gTestSuccess) | 76 if (!gTestSuccess) |
| 77 error_code = 255; | 77 error_code = 255; |
| 78 return error_code; | 78 return error_code; |
| 79 } | 79 } |
| OLD | NEW |