Move parsing of GID2 to generic Card class

Change-Id: I3fe4b08c888a39cda7e7fce7a467f17908bdc3ad
This commit is contained in:
Supreeth Herle committed 2020-03-22 10:17:05 +01:00
1 parent 98a6927b27
commit c7f2f7413b
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -124,7 +124,7 @@ if __name__ == '__main__':
# EF.GID2 # EF.GID2
try: try:
(res, sw) = scc.read_binary(EF['GID2']) (res, sw) = card.read_gid2()
if sw == '9000': if sw == '9000':
print("GID2: %s" % (res,)) print("GID2: %s" % (res,))
else: else:
+7
View File
@@ -152,6 +152,13 @@ class Card(object):
else: else:
return (None, sw) 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 # Read the (full) AID for either ISIM or USIM application
def read_aid(self, isim = False): def read_aid(self, isim = False):