mirror of https://gerrit.osmocom.org/pysim
apdu/ts_102_221: Fix SELECT of 3f00
In order to be able to explicitly select the MF via 3f00, we need to pass the 'MF' to get_selectables(), so the record is included in the list of selectable files from the current working directory. Change-Id: I27085896142fe547a6e93e01e63e59bbc65c8b8a
This commit is contained in:
parent
498361f3b5
commit
8e9c844130
|
@ -63,9 +63,10 @@ class UiccSelect(ApduCommand, n='SELECT', ins=0xA4, cla=['0X', '4X', '6X']):
|
|||
lchan.selected_adf = sels['ADF.USIM']
|
||||
lchan.selected_file = lchan.selected_adf
|
||||
#print("\tSELECT CUR_ADF %s" % lchan.selected_file)
|
||||
# iterate to next element in path
|
||||
continue
|
||||
else:
|
||||
sels = lchan.selected_file.get_selectables(['FIDS'])
|
||||
sels = lchan.selected_file.get_selectables(['FIDS','MF'])
|
||||
if file_hex in sels:
|
||||
if self.successful:
|
||||
#print("\tSELECT %s" % sels[file_hex])
|
||||
|
@ -73,12 +74,13 @@ class UiccSelect(ApduCommand, n='SELECT', ins=0xA4, cla=['0X', '4X', '6X']):
|
|||
else:
|
||||
#print("\tSELECT %s FAILED" % sels[file_hex])
|
||||
pass
|
||||
# iterate to next element in path
|
||||
continue
|
||||
logger.warning('SELECT UNKNOWN FID %s (%s)' % (file_hex, '/'.join([b2h(x) for x in path])))
|
||||
elif mode == 'df_ef_or_mf_by_file_id':
|
||||
if len(self.cmd_data) != 2:
|
||||
raise ValueError('Expecting a 2-byte FID')
|
||||
sels = lchan.selected_file.get_selectables(['FIDS'])
|
||||
sels = lchan.selected_file.get_selectables(['FIDS','MF'])
|
||||
file_hex = b2h(self.cmd_data)
|
||||
if file_hex in sels:
|
||||
if self.successful:
|
||||
|
|
Loading…
Reference in New Issue