From 9d1487af6dbf8b8ea2d1bb83045fd51bc1ec48fa Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 5 Feb 2024 10:41:29 +0100 Subject: [PATCH] global_platform: Fix INSTALL [for personalization] The APDU hex string needs to use %02x instead of %02u... Change-Id: Ic3b30ba623ee04f5190c77afd226b52165b3183f --- pySim/global_platform/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py index c7ea0bed..ca99f5ff 100644 --- a/pySim/global_platform/__init__.py +++ b/pySim/global_platform/__init__.py @@ -630,7 +630,7 @@ class ADF_SD(CardADF): """Perform GlobalPlatform INSTALL [for personalization] command in order to inform a Security Domain that the following STORE DATA commands are meant for a specific AID (specified here).""" # Section 11.5.2.3.6 / Table 11-47 - self.install(0x20, 0x00, "0000%02u%s000000" % (len(opts.application_aid)//2, opts.application_aid)) + self.install(0x20, 0x00, "0000%02x%s000000" % (len(opts.application_aid)//2, opts.application_aid)) inst_inst_parser = argparse.ArgumentParser() inst_inst_parser.add_argument('--load-file-aid', type=is_hexstr, default='',