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>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user