Skip to content

Commit

Permalink
rationalize logging of unimplemented parsing of security conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
p1-bmu committed Aug 30, 2021
1 parent b4641bc commit 9c0003c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions card/ICC.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,15 +790,16 @@ def parse_FCP(self, Data=[]):
# Security Attributes ref to expanded
elif T == 0x8B:
fil[self.file_tags[T]] = V
if self.dbg:
log(2, '(parse_FCP) parse_expanded_security_attribute not '\
if self.dbg >= 2:
log(3, '(parse_FCP) parse_expanded_security_attribute not '\
'implemented')
self.parse_expanded_security_attribute(V, fil)
# other security attributes... not implemented
elif T in (0x86, 0x8E, 0xA0, 0xA1, 0xAB):
fil[self.file_tags[T]] = V
log(2, '(parse_FCP) parse_security_attribute not implemented '\
'for tag 0x%X' % T)
if self.dbg >= 2:
log(3, '(parse_FCP) parse_security_attribute not implemented '\
'for tag 0x%X' % T)
self.parse_security_attribute(V, fil)
# file size or length
elif T in (0x80, 0x81):
Expand Down Expand Up @@ -1087,15 +1088,15 @@ def parse_FCI(self, Data=[]):
# Security Attributes ref to expanded
elif T == 0x8B:
fil[self.file_tags[T]] = V
if self.dbg:
log(2, '(parse_FCI) parse_expanded_security_attribute not '\
if self.dbg >= 2:
log(3, '(parse_FCI) parse_expanded_security_attribute not '\
'implemented')
self.parse_expanded_security_attribute(V, fil)
# other security attributes... not implemented
elif T in (0x86, 0x8E, 0xA0, 0xA1, 0xAB):
fil[self.file_tags[T]] = V
if self.dbg:
log(2, '(parse_FCI) parse_security_attribute not implemented '\
if self.dbg >= 2:
log(3, '(parse_FCI) parse_security_attribute not implemented '\
'for tag 0x%X' % T)
self.parse_security_attribute(V, fil)
# file size or length
Expand Down

0 comments on commit 9c0003c

Please sign in to comment.