diff options
author | Jin, Eric <eric.jin@intel.com> | 2019-06-26 13:55:35 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-06-28 11:39:06 +0800 |
commit | 104a1aa19bbb79418883dc6cc3cf0720d9f36119 (patch) | |
tree | 207daa43e20601ad1ba06e211498fa5c32a83864 /BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py | |
parent | c54c85621826ace8684879fef9eb8ba7f49cfb54 (diff) | |
download | edk2-104a1aa19bbb79418883dc6cc3cf0720d9f36119.tar.gz edk2-104a1aa19bbb79418883dc6cc3cf0720d9f36119.tar.bz2 edk2-104a1aa19bbb79418883dc6cc3cf0720d9f36119.zip |
BaseTools/Capsule: Supports multiple payloads and drivers in capsule
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1834
1)Add arguments "--embedded-driver" to support embedded driver
in command line.
2)Add arguments "--update-image-index" to identify ImageIndex
within the device in command line.
3)Add arguments "-j JSONFILE" to support multiple payloads and
embedded drivers with JSON file.
The update is in a backwards compatible manner, so all command
line options to support single payload are still supported. But
all the options associated with multiple payloads should be
provided in a JSON file.
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Eric Jin <eric.jin@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py')
-rw-r--r-- | BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py b/BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py index 4b8c6da26a..48c605faa8 100644 --- a/BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py +++ b/BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py @@ -2,7 +2,7 @@ # Module that encodes and decodes a EFI_FIRMWARE_IMAGE_AUTHENTICATION with
# certificate data and payload data.
#
-# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -166,6 +166,18 @@ class FmpAuthHeaderClass (object): self._Valid = True
return self.Payload
+ def IsSigned (self, Buffer):
+ if len (Buffer) < self._StructSize:
+ return False
+ (MonotonicCount, dwLength, wRevision, wCertificateType, CertType) = \
+ struct.unpack (
+ self._StructFormat,
+ Buffer[0:self._StructSize]
+ )
+ if CertType != self._EFI_CERT_TYPE_PKCS7_GUID.bytes_le:
+ return False
+ return True
+
def DumpInfo (self):
if not self._Valid:
raise ValueError
|