mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-24 14:28:32 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user