Allow new preamble in vblock for Alex firmware
This is a cherry-pick of the change in
http://gerrit.chromium.org/gerrit/#change,5212,patchset=11.
BUG=chrome-os-partner:5894
TEST=Run HWID validation test
Change-Id: I9da44242330ddf433173a63006b11edb4ade62aa
Reviewed-on: http://gerrit.chromium.org/gerrit/7470
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Jay Kim <yongjaek@chromium.org>
diff --git a/client/cros/vblock.py b/client/cros/vblock.py
index 5f1aef6..3e5dc01 100644
--- a/client/cros/vblock.py
+++ b/client/cros/vblock.py
@@ -48,8 +48,7 @@
raise ValueError, 'unknown key block magic: %s' % header['magic']
major = header['header_version_major']
minor = header['header_version_minor']
- if major != KEY_BLOCK_HEADER_VERSION_MAJOR or \
- minor != KEY_BLOCK_HEADER_VERSION_MINOR:
+ if major != KEY_BLOCK_HEADER_VERSION_MAJOR:
raise ValueError, 'unknown key block version (%d.%d)' % (major, minor)
return header
@@ -83,8 +82,7 @@
# check values
major = header['header_version_major']
minor = header['header_version_minor']
- if major != FIRMWARE_PREAMBLE_HEADER_VERSION_MAJOR or \
- minor != FIRMWARE_PREAMBLE_HEADER_VERSION_MINOR:
+ if major != FIRMWARE_PREAMBLE_HEADER_VERSION_MAJOR:
raise ValueError, 'unknown preamble version: (%d.%d)' % (major, minor)
return header