mirror of https://github.com/acidanthera/audk.git
BaseTools/GenerateCapsule.py: Fix checking for DepExp presence
struct.unpack() returns a tuple even for a single-element pack, resulting in signature verification being evaluated to false even when the signature is there. This fixes --decode and --dump-info actions incorrectly reporting issues with parsing capsule dependencies when there are none. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
parent
eeddb86aaa
commit
26bc42f1e3
|
@ -831,7 +831,7 @@ if __name__ == '__main__':
|
|||
print ('--------')
|
||||
print ('No EFI_FIRMWARE_IMAGE_AUTHENTICATION')
|
||||
|
||||
PayloadSignature = struct.unpack ('<I', SinglePayloadDescriptor.Payload[0:4])
|
||||
(PayloadSignature,) = struct.unpack ('<I', SinglePayloadDescriptor.Payload[0:4])
|
||||
if PayloadSignature != FmpPayloadHeader.Signature:
|
||||
SinglePayloadDescriptor.UseDependency = True
|
||||
try:
|
||||
|
@ -918,7 +918,7 @@ if __name__ == '__main__':
|
|||
print ('--------')
|
||||
print ('No EFI_FIRMWARE_IMAGE_AUTHENTICATION')
|
||||
|
||||
PayloadSignature = struct.unpack ('<I', Result[0:4])
|
||||
(PayloadSignature,) = struct.unpack ('<I', Result[0:4])
|
||||
if PayloadSignature != FmpPayloadHeader.Signature:
|
||||
try:
|
||||
Result = CapsuleDependency.Decode (Result)
|
||||
|
|
Loading…
Reference in New Issue