PublicKeyHexString = Process.communicate()[0].split('=')[1].strip()\r
PublicKey = ''\r
while len(PublicKeyHexString) > 0:\r
- PublicKey = PublicKey + chr(int(PublicKeyHexString[0:2], 16))\r
+ PublicKey = PublicKey + PublicKeyHexString[0:2]\r
PublicKeyHexString=PublicKeyHexString[2:]\r
if Process.returncode != 0:\r
sys.exit(Process.returncode)\r
#\r
args.OutputFile = open(args.OutputFileName, 'wb')\r
args.OutputFile.write(EFI_HASH_ALGORITHM_SHA256_GUID.bytes_le)\r
- args.OutputFile.write(PublicKey)\r
+ args.OutputFile.write(bytearray.fromhex(str(PublicKey)))\r
args.OutputFile.write(Signature)\r
args.OutputFile.write(args.InputFileBuffer)\r
args.OutputFile.close()\r