New AIDs, name can be None now

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@167 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
hploetz 2007-01-17 09:14:35 +00:00
parent 42cc88fc9f
commit a7a36c1dd2
2 changed files with 5 additions and 2 deletions

View File

@ -35,6 +35,7 @@ class Card:
"\xa0\x00\x00\x01\x67\x45\x53\x49\x47\x4e": ("DF.ESIGN", ), "\xa0\x00\x00\x01\x67\x45\x53\x49\x47\x4e": ("DF.ESIGN", ),
"\xa0\x00\x00\x00\x63\x50\x4b\x43\x53\x2d\x31\x35": ("DF_PKCS15", ), "\xa0\x00\x00\x00\x63\x50\x4b\x43\x53\x2d\x31\x35": ("DF_PKCS15", ),
"\xD2\x76\x00\x01\x24\x01": ("DF_OpenPGP", "OpenPGP card", {"significant_length": 6} ), "\xD2\x76\x00\x01\x24\x01": ("DF_OpenPGP", "OpenPGP card", {"significant_length": 6} ),
"\xa0\x00\x00\x02\x47\x10\x01": (None, "Machine Readable Travel Document"),
## The following are from 0341a.pdf: BSI-DSZ-CC-0341-2006 ## The following are from 0341a.pdf: BSI-DSZ-CC-0341-2006
"\xD2\x76\x00\x00\x66\x01": ("DF_SIG", "Signature application", {"fid": "\xAB\x00"}), "\xD2\x76\x00\x00\x66\x01": ("DF_SIG", "Signature application", {"fid": "\xAB\x00"}),
"\xD2\x76\x00\x00\x25\x5A\x41\x02\x00": ("ZA_MF_NEU", "Zusatzanwendungen", {"fid": "\xA7\x00"}), "\xD2\x76\x00\x00\x25\x5A\x41\x02\x00": ("ZA_MF_NEU", "Zusatzanwendungen", {"fid": "\xA7\x00"}),
@ -59,6 +60,7 @@ class Card:
"\xD2\x76\x00\x00\x60": ("Wolfgang Rankl", ), "\xD2\x76\x00\x00\x60": ("Wolfgang Rankl", ),
"\xD2\x76\x00\x00\x05": ("Giesecke & Devrient", ), "\xD2\x76\x00\x00\x05": ("Giesecke & Devrient", ),
"\xD2\x76\x00\x00\x40": ("Zentralinstitut für die Kassenaerztliche Versorgung in der Bundesrepublik Deutschland", ), # hpc-use-cases-01.pdf "\xD2\x76\x00\x00\x40": ("Zentralinstitut für die Kassenaerztliche Versorgung in der Bundesrepublik Deutschland", ), # hpc-use-cases-01.pdf
"\xa0\x00\x00\x02\x47": ("ICAO", ),
} }
def _decode_df_name(self, value): def _decode_df_name(self, value):
@ -77,7 +79,8 @@ class Card:
result_array = [] result_array = []
if info is not None: if info is not None:
result_array.append( ("Name", info[0]) ) if info[0] is not None:
result_array.append( ("Name", info[0]) )
if len(info) > 1 and not info[1] is None: if len(info) > 1 and not info[1] is None:
result_array.append( ("Description", info[1] ) ) result_array.append( ("Description", info[1] ) )

View File

@ -128,7 +128,7 @@ class ISO_7816_4_Card(Card):
"""Select an application on the card. """Select an application on the card.
application can be given either as hexadecimal aid or by symbolic name (if known).""" application can be given either as hexadecimal aid or by symbolic name (if known)."""
s = [a for a,b in self.APPLICATIONS.items() if b[0].lower() == application.lower()] s = [a for a,b in self.APPLICATIONS.items() if b[0] is not None and b[0].lower() == application.lower()]
if len(s) > 0: if len(s) > 0:
aid = s[0] aid = s[0]
else: else: