laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/36777?usp=email )
Change subject: pySim-trace: Support decoding of eUICC traces
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36777?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I362a1a7f12d979ff0b7971d5300db9ed56bb1ee5
Gerrit-Change-Number: 36777
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 10 May 2024 19:18:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/36777?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: pySim-trace: Support decoding of eUICC traces
......................................................................
pySim-trace: Support decoding of eUICC traces
Let's register the ISD-R and ECASD applications so we avoid the warnings
printed when processing an eUICC protocol trace:
WARNING pySim.apdu.ts_102_221: SELECT UNKNOWN AID a0000005591010ffffffff8900000100
Change-Id: I362a1a7f12d979ff0b7971d5300db9ed56bb1ee5
---
M pySim-trace.py
M pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok
2 files changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/77/36777/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36777?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I362a1a7f12d979ff0b7971d5300db9ed56bb1ee5
Gerrit-Change-Number: 36777
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/36779?usp=email )
Change subject: pySim.global_platform: Fix key encryption with DEK
......................................................................
pySim.global_platform: Fix key encryption with DEK
When a SCP is active, the DEK is used to encrypt any key material
that's installed using PUT KEY. The code prior to this patch fails
to handle this case as it calls the encrypt_key() method on the wrong
object.
Change-Id: I6e10fb9c7881ba74ad2986c36bba95b336470838
---
M pySim/global_platform/__init__.py
1 file changed, 15 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py
index 9960560..5086721 100644
--- a/pySim/global_platform/__init__.py
+++ b/pySim/global_platform/__init__.py
@@ -550,7 +550,7 @@
kcv = b2h(kcv_bin)
if self._cmd.lchan.scc.scp:
# encrypte key data with DEK of current SCP
- kcb = b2h(self._cmd.lchan.scc.scp.card_keys.encrypt_key(h2b(opts.key_data[i])))
+ kcb = b2h(self._cmd.lchan.scc.scp.encrypt_key(h2b(opts.key_data[i])))
else:
# (for example) during personalization, DEK might not be required)
kcb = opts.key_data[i]
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36779?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6e10fb9c7881ba74ad2986c36bba95b336470838
Gerrit-Change-Number: 36779
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/36776?usp=email )
Change subject: filesystem: Enforce lower-case hex AID
......................................................................
filesystem: Enforce lower-case hex AID
our utils.b2h() returns values in lower-case hex string notation,
so let's make sure the CardADF and CardApplication AID values are also
stored in lower case notation, othewise the matching baesd on AIDs
returned from the card will not work, specifically as we use uppercase
AIDs in pySim.euicc for CardApplicationECASD and CardApplicationISDR.
Rather than change those two instances, let's solve it in a generic way.
We already do the same for the CardFile.fid member.
Change-Id: Ie42392412d9eb817fbc563d9165faab198ffa7a9
---
M pySim/filesystem.py
1 file changed, 22 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 4d5fde9..77482cc 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -512,7 +512,7 @@
super().__init__(**kwargs)
# reference to CardApplication may be set from CardApplication constructor
self.application = None # type: Optional[CardApplication]
- self.aid = aid # Application Identifier
+ self.aid = aid.lower() # Application Identifier
self.has_fs = has_fs # Flag to tell whether the ADF supports a filesystem or not
mf = self.get_mf()
if mf:
@@ -1294,6 +1294,8 @@
adf : ADF name
sw : Dict of status word conversions
"""
+ if aid:
+ aid = aid.lower()
self.name = name
self.adf = adf
self.sw = sw or {}
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36776?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie42392412d9eb817fbc563d9165faab198ffa7a9
Gerrit-Change-Number: 36776
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged