Another fingerprinting characteristic: SELECT APPLICATION with P2=0 and no Le leads to 6700 Wrong Length
(The LDS technical report Appendix 2 to Annex A only explicitly allows P2=0xc with no Le) git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@201 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
parent
59adb05865
commit
89f7828412
|
@ -137,11 +137,16 @@ def fingerprint_7816(card):
|
||||||
return "".join( [UNIT_FORMAT % r for r in compressed] ) + ":".join( (len(exceptional) > 0 and [""] or []) + [binascii.b2a_hex(e) for e in exceptional] )
|
return "".join( [UNIT_FORMAT % r for r in compressed] ) + ":".join( (len(exceptional) > 0 and [""] or []) + [binascii.b2a_hex(e) for e in exceptional] )
|
||||||
|
|
||||||
result = []
|
result = []
|
||||||
|
postfix = ""
|
||||||
test_icao = card.select_application(card.resolve_symbolic_aid("mrtd"), le=None)
|
test_icao = card.select_application(card.resolve_symbolic_aid("mrtd"), le=None)
|
||||||
|
if test_icao.sw == "\x67\x00":
|
||||||
|
postfix = ":6700" # SELECT APPLICATION with P2=0 and without Le returns 6700 Wrong Length
|
||||||
|
test_icao = card.select_application(card.resolve_symbolic_aid("mrtd"), le=None, P2=0x0c)
|
||||||
|
|
||||||
if not card.check_sw(test_icao.sw, card.PURPOSE_SUCCESS):
|
if not card.check_sw(test_icao.sw, card.PURPOSE_SUCCESS):
|
||||||
result.append("N") # Not an ICAO MRTD
|
result.append("N"+postfix) # Not an ICAO MRTD
|
||||||
else:
|
else:
|
||||||
result.append("P") # An ICAO MRTD
|
result.append("P"+postfix) # An ICAO MRTD
|
||||||
|
|
||||||
bac = detect_bac(card)
|
bac = detect_bac(card)
|
||||||
result.append(bac) # BAC status
|
result.append(bac) # BAC status
|
||||||
|
|
|
@ -16,3 +16,6 @@
|
||||||
|
|
||||||
0:00640411010131800090005a,P,.*
|
0:00640411010131800090005a,P,.*
|
||||||
German Passport
|
German Passport
|
||||||
|
|
||||||
|
0:006404150102009000ee,P:6700,1,569AAA9A
|
||||||
|
Electronic Passport Specimen, issued by Bundesdruckerei, Germany
|
||||||
|
|
Loading…
Reference in New Issue