laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35497?usp=email )
Change subject: euicc: Fix delete_profile command ......................................................................
euicc: Fix delete_profile command
Contrary to {enable,disable}_profile, the delete_profile does not use the ProfileIdentifier TLV, but directly the Iccid / IsdpAid.
Change-Id: I43e298524048703264e16cbdd0b76d82ba976985 --- M pySim/euicc.py 1 file changed, 15 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/97/35497/1
diff --git a/pySim/euicc.py b/pySim/euicc.py index 19b1c57..e45476f 100644 --- a/pySim/euicc.py +++ b/pySim/euicc.py @@ -231,7 +231,7 @@ class DeleteResult(BER_TLV_IE, tag=0x80): _construct = Enum(Int8ub, ok=0, iccidOrAidNotFound=1, profileNotInDisabledState=2, disallowedByPolicy=3, undefinedError=127) -class DeleteProfileReq(BER_TLV_IE, tag=0xbf33, nested=[ProfileIdentifier]): +class DeleteProfileReq(BER_TLV_IE, tag=0xbf33, nested=[IsdpAid, Iccid]): pass class DeleteProfileResp(BER_TLV_IE, tag=0xbf33, nested=[DeleteResult]): pass @@ -444,9 +444,9 @@ def do_delete_profile(self, opts): """Perform an ES10c DeleteProfile function.""" if opts.isdp_aid: - p_id = ProfileIdentifier(children=[IsdpAid(decoded=opts.isdp_aid)]) + p_id = IsdpAid(decoded=opts.isdp_aid) if opts.iccid: - p_id = ProfileIdentifier(children=[Iccid(decoded=opts.iccid)]) + p_id = Iccid(decoded=opts.iccid) dp_cmd_contents = [p_id] dp_cmd = DeleteProfileReq(children=dp_cmd_contents) dp = ADF_ISDR.store_data_tlv(self._cmd.lchan.scc, dp_cmd, DeleteProfileResp)