mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
BaseTools:Fixed Rsa issue and a set define issue.
ValueError: non-hexadecimal number found in fromhex() arg at position 0 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
parent
7aef7b7cbf
commit
4a3773e578
@ -156,7 +156,7 @@ if __name__ == '__main__':
|
||||
PublicKeyHexString = Process.communicate()[0].split('=')[1].strip()
|
||||
PublicKey = ''
|
||||
while len(PublicKeyHexString) > 0:
|
||||
PublicKey = PublicKey + chr(int(PublicKeyHexString[0:2], 16))
|
||||
PublicKey = PublicKey + PublicKeyHexString[0:2]
|
||||
PublicKeyHexString=PublicKeyHexString[2:]
|
||||
if Process.returncode != 0:
|
||||
sys.exit(Process.returncode)
|
||||
@ -188,7 +188,7 @@ if __name__ == '__main__':
|
||||
#
|
||||
args.OutputFile = open(args.OutputFileName, 'wb')
|
||||
args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.bytes_le)
|
||||
args.OutputFile.write(PublicKey)
|
||||
args.OutputFile.write(bytearray.fromhex(str(PublicKey)))
|
||||
args.OutputFile.write(Signature)
|
||||
args.OutputFile.write(args.InputFileBuffer)
|
||||
args.OutputFile.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user