Minor beautification

git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@127 f711b948-2313-0410-aaa9-d29f33439f0b
This commit is contained in:
hploetz 2006-11-19 04:44:45 +00:00
parent 15f7be1e4f
commit 3994578708
5 changed files with 8 additions and 8 deletions

View File

@ -6,8 +6,8 @@ DEBUG = True
class Card:
DRIVER_NAME = "Generic"
APDU_GET_RESPONSE = C_APDU("\x00\xC0\x00\x00")
APDU_VERIFY_PIN = C_APDU("\x00\x20\x00\x00")
APDU_GET_RESPONSE = C_APDU(ins=0xc0)
APDU_VERIFY_PIN = C_APDU(ins=0x20)
SW_OK = '\x90\x00'
SW1_RETRY = 0x61 ## If this SW1 is received then GET RESPONSE should be called with SW2
## Note: an item in this list must be a tuple of (atr, mask) where atr is a binary

View File

@ -2,9 +2,9 @@ import TLV_utils
from generic_card import *
class ISO_7816_4_Card(Card):
APDU_SELECT_FILE = C_APDU("\x00\xa4\x00\x00")
APDU_READ_BINARY = C_APDU("\x00\xb0\x00\x00\x00")
APDU_READ_RECORD = C_APDU("\x00\xb2\x00\x00\x00")
APDU_SELECT_FILE = C_APDU(ins=0xa4)
APDU_READ_BINARY = C_APDU(ins=0xb0,le=0)
APDU_READ_RECORD = C_APDU(ins=0xb2,le=0)
DRIVER_NAME = "ISO 7816-4"
FID_MF = "\x3f\x00"

View File

@ -3,7 +3,7 @@ from generic_card import *
from utils import C_APDU
class Java_Card(Card):
APDU_SELECT_APPLICATION = C_APDU("\x00\xa4\x04\x00")
APDU_SELECT_APPLICATION = C_APDU(ins=0xa4,p1=0x04)
DRIVER_NAME = "Generic Java"
APPLICATIONS = {
"muscle": "\xa0\x00\x00\x00\x01\x01"

View File

@ -3,7 +3,7 @@ from iso_7816_4_card import *
class Starcos_Card(ISO_7816_4_Card):
DRIVER_NAME = "Starcos"
APDU_READ_BINARY = C_APDU("\x00\xb0\x00\x00\xfe")
APDU_READ_BINARY = C_APDU(ins=0xb0,le=0xfe)
def change_dir(self, fid = None):
"Change to a child DF. Alternatively, change to MF if fid is None."

View File

@ -4,7 +4,7 @@ import building_blocks
class TCOS_Card(ISO_7816_4_Card,building_blocks.Card_with_80_aa):
DRIVER_NAME = "TCOS"
APDU_DELETE_FILE = C_APDU("\x80\xe4\x00\x00")
APDU_DELETE_FILE = C_APDU(cla=0x80,ins=0xe4)
ATRS = [
("3bba96008131865d0064........31809000..", None),