| 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 firmware image library. | 5 * Tests for firmware image library. |
| 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 "cryptolib.h" |
| 12 #include "file_keys.h" | 12 #include "file_keys.h" |
| 13 #include "firmware_image.h" | |
| 14 #include "host_common.h" | 13 #include "host_common.h" |
| 15 #include "test_common.h" | 14 #include "test_common.h" |
| 16 #include "utility.h" | 15 #include "utility.h" |
| 17 #include "vboot_common.h" | 16 #include "vboot_common.h" |
| 18 | 17 |
| 19 | 18 |
| 20 static void ReChecksumKeyBlock(VbKeyBlockHeader *h) { | 19 static void ReChecksumKeyBlock(VbKeyBlockHeader *h) { |
| 21 uint8_t* newchk = DigestBuf((const uint8_t*)h, | 20 uint8_t* newchk = DigestBuf((const uint8_t*)h, |
| 22 h->key_block_checksum.data_size, | 21 h->key_block_checksum.data_size, |
| 23 SHA512_DIGEST_ALGORITHM); | 22 SHA512_DIGEST_ALGORITHM); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 288 |
| 290 if (signing_public_key) | 289 if (signing_public_key) |
| 291 Free(signing_public_key); | 290 Free(signing_public_key); |
| 292 if (signing_private_key) | 291 if (signing_private_key) |
| 293 Free(signing_private_key); | 292 Free(signing_private_key); |
| 294 if (data_public_key) | 293 if (data_public_key) |
| 295 Free(data_public_key); | 294 Free(data_public_key); |
| 296 | 295 |
| 297 return error_code; | 296 return error_code; |
| 298 } | 297 } |
| OLD | NEW |