mirror of https://gerrit.osmocom.org/pysim
Move parsing of GID2 to generic Card class
Change-Id: I3fe4b08c888a39cda7e7fce7a467f17908bdc3ad
This commit is contained in:
parent
98a6927b27
commit
c7f2f7413b
|
@ -124,7 +124,7 @@ if __name__ == '__main__':
|
|||
|
||||
# EF.GID2
|
||||
try:
|
||||
(res, sw) = scc.read_binary(EF['GID2'])
|
||||
(res, sw) = card.read_gid2()
|
||||
if sw == '9000':
|
||||
print("GID2: %s" % (res,))
|
||||
else:
|
||||
|
|
|
@ -152,6 +152,13 @@ class Card(object):
|
|||
else:
|
||||
return (None, sw)
|
||||
|
||||
def read_gid2(self):
|
||||
(res, sw) = self._scc.read_binary(EF['GID2'])
|
||||
if sw == '9000':
|
||||
return (res, sw)
|
||||
else:
|
||||
return (None, sw)
|
||||
|
||||
# Read the (full) AID for either ISIM or USIM application
|
||||
def read_aid(self, isim = False):
|
||||
|
||||
|
|
Loading…
Reference in New Issue