cards: get rid of method read_iccid

The method read_iccid in class CardBase should be put back to
legacy/cards.py. The reason for this is that it falls in the same
category like read_imsi, read_ki, etc. We should not use those old
methods in future programs since we have a more modern infrastructure
(lchan) now.

Also pySim-shell.py is the only caller of this method now. It is not
used in any other place.

Related: RT#67094
Change-Id: Ied3ae6fd107992abcc1b5ea3edb0eb4bdcd2f892
This commit is contained in:
Philipp Maier
2023-08-16 10:44:57 +02:00
committed by laforge
parent 09ff0e2b43
commit a42ee6f99d
3 changed files with 13 additions and 11 deletions

View File

@@ -59,6 +59,13 @@ class SimCard(SimCardBase):
(res, sw) = self._scc.verify_chv(self._adm_chv_num, key)
return sw
def read_iccid(self):
(res, sw) = self._scc.read_binary(EF['ICCID'])
if sw == '9000':
return (dec_iccid(res), sw)
else:
return (None, sw)
def update_iccid(self, iccid):
data, sw = self._scc.update_binary(EF['ICCID'], enc_iccid(iccid))
return sw