aboutsummaryrefslogtreecommitdiffstats
path: root/cards
diff options
context:
space:
mode:
authorhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2007-01-17 09:14:35 +0000
committerhploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b>2007-01-17 09:14:35 +0000
commita7a36c1dd2701a2e6ffaf76f45bc9ffdc9de1c1e (patch)
tree313f08b7abb1ad9cd34faaba90b38e9bd75c1f9e /cards
parent42cc88fc9f9b9245c884ac88239d637f8974e14d (diff)
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
Diffstat (limited to 'cards')
-rw-r--r--cards/generic_card.py5
-rw-r--r--cards/iso_7816_4_card.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/cards/generic_card.py b/cards/generic_card.py
index 7f70178..0ef53e5 100644
--- a/cards/generic_card.py
+++ b/cards/generic_card.py
@@ -35,6 +35,7 @@ class Card:
"\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", ),
"\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
"\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"}),
@@ -59,6 +60,7 @@ class Card:
"\xD2\x76\x00\x00\x60": ("Wolfgang Rankl", ),
"\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
+ "\xa0\x00\x00\x02\x47": ("ICAO", ),
}
def _decode_df_name(self, value):
@@ -77,7 +79,8 @@ class Card:
result_array = []
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:
result_array.append( ("Description", info[1] ) )
diff --git a/cards/iso_7816_4_card.py b/cards/iso_7816_4_card.py
index 521012b..ed61943 100644
--- a/cards/iso_7816_4_card.py
+++ b/cards/iso_7816_4_card.py
@@ -128,7 +128,7 @@ class ISO_7816_4_Card(Card):
"""Select an application on the card.
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:
aid = s[0]
else: