diff options
author | Harald Welte <laforge@osmocom.org> | 2024-01-07 18:48:05 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2024-01-08 12:10:17 +0000 |
commit | 0002789a88c42d223b715cd8b091cfea54d6b5d8 (patch) | |
tree | 708271217d970c0a7b5682a9480965c5912dc4b8 | |
parent | cfa62cb95b2d0894db40d184ebc4ffeb8c453444 (diff) |
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
-rw-r--r-- | pySim/euicc.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 DisableProfileResp(BER_TLV_IE, tag=0xbf32, nested=[DisableResult]): 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 @@ class ADF_ISDR(CardADF): 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) |