Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: src/platform/vboot_reference/utils/firmware_image_fw.c

Issue 1593002: Revert "VBoot Reference: Refactor Part 2 - Crypto Libraries" (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * Functions for verifying a verified boot firmware image. 5 * Functions for verifying a verified boot firmware image.
6 * (Firmware Portion) 6 * (Firmware Portion)
7 */ 7 */
8 8
9 #include "firmware_image_fw.h" 9 #include "firmware_image_fw.h"
10 10
11 #include "cryptolib.h" 11 #include "padding.h"
12 #include "rollback_index.h" 12 #include "rollback_index.h"
13 #include "rsa_utility.h"
14 #include "sha_utility.h"
13 #include "utility.h" 15 #include "utility.h"
14 16
15 /* Macro to determine the size of a field structure in the FirmwareImage 17 /* Macro to determine the size of a field structure in the FirmwareImage
16 * structure. */ 18 * structure. */
17 #define FIELD_LEN(field) (sizeof(((FirmwareImage*)0)->field)) 19 #define FIELD_LEN(field) (sizeof(((FirmwareImage*)0)->field))
18 20
19 char* kVerifyFirmwareErrors[VERIFY_FIRMWARE_MAX] = { 21 char* kVerifyFirmwareErrors[VERIFY_FIRMWARE_MAX] = {
20 "Success.", 22 "Success.",
21 "Invalid Image.", 23 "Invalid Image.",
22 "Root Key Signature Failed.", 24 "Root Key Signature Failed.",
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 * attempted. 314 * attempted.
313 * If FirmwareB is not a rollback, then we attempt to do the verification. 315 * If FirmwareB is not a rollback, then we attempt to do the verification.
314 */ 316 */
315 if (stored_lversion <= firmwareB_lversion && 317 if (stored_lversion <= firmwareB_lversion &&
316 (VERIFY_FIRMWARE_SUCCESS == VerifyFirmware(root_key_blob, firmwareB))) 318 (VERIFY_FIRMWARE_SUCCESS == VerifyFirmware(root_key_blob, firmwareB)))
317 return BOOT_FIRMWARE_B_CONTINUE; 319 return BOOT_FIRMWARE_B_CONTINUE;
318 } 320 }
319 /* D'oh: No bootable firmware. */ 321 /* D'oh: No bootable firmware. */
320 return BOOT_FIRMWARE_RECOVERY_CONTINUE; 322 return BOOT_FIRMWARE_RECOVERY_CONTINUE;
321 } 323 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utils/firmware_image.c ('k') | src/platform/vboot_reference/utils/firmware_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698