module documentation

PCSCPart10: PC/SC Part 10 (pinpad)

__author__ = "Ludovic Rousseau"

Copyright 2009-2010 Ludovic Rosseau Author: Ludovic Rousseau, mailto:ludovic.rousseau@free.fr

This file is part of pyscard.

pyscard is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

pyscard is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with pyscard; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Function getFeatureRequest Get the list of Part10 features supported by the reader.
Function getPinProperties return the PIN_PROPERTIES structure
Function getTlvProperties return the GET_TLV_PROPERTIES structure
Function hasFeature return the controlCode for a feature or None
Function parseFeatureRequest Get the list of Part10 features supported by the reader.
Function parseTlvProperties return the GET_TLV_PROPERTIES structure
Constant CM_IOCTL_GET_FEATURE_REQUEST Undocumented
Constant FEATURE_ABORT Undocumented
Constant FEATURE_CCID_ESC_COMMAND Undocumented
Constant FEATURE_GET_KEY Undocumented
Constant FEATURE_GET_KEY_PRESSED Undocumented
Constant FEATURE_GET_TLV_PROPERTIES Undocumented
Constant FEATURE_IFD_DISPLAY_PROPERTIES Undocumented
Constant FEATURE_IFD_PIN_PROPERTIES Undocumented
Constant FEATURE_MCT_READER_DIRECT Undocumented
Constant FEATURE_MCT_UNIVERSAL Undocumented
Constant FEATURE_MODIFY_PIN_DIRECT Undocumented
Constant FEATURE_MODIFY_PIN_DIRECT_APP_ID Undocumented
Constant FEATURE_MODIFY_PIN_FINISH Undocumented
Constant FEATURE_MODIFY_PIN_START Undocumented
Constant FEATURE_SET_SPE_MESSAGE Undocumented
Constant FEATURE_VERIFY_PIN_DIRECT Undocumented
Constant FEATURE_VERIFY_PIN_DIRECT_APP_ID Undocumented
Constant FEATURE_VERIFY_PIN_FINISH Undocumented
Constant FEATURE_VERIFY_PIN_START Undocumented
Constant FEATURE_WRITE_DISPLAY Undocumented
Variable Features Undocumented
Variable PCSCv2_PART10_PROPERTY_bEntryValidationCondition Undocumented
Variable PCSCv2_PART10_PROPERTY_bMaxPINSize Undocumented
Variable PCSCv2_PART10_PROPERTY_bMinPINSize Undocumented
Variable PCSCv2_PART10_PROPERTY_bPPDUSupport Undocumented
Variable PCSCv2_PART10_PROPERTY_bTimeOut2 Undocumented
Variable PCSCv2_PART10_PROPERTY_dwMaxAPDUDataSize Undocumented
Variable PCSCv2_PART10_PROPERTY_sFirmwareID Undocumented
Variable PCSCv2_PART10_PROPERTY_wIdProduct Undocumented
Variable PCSCv2_PART10_PROPERTY_wIdVendor Undocumented
Variable PCSCv2_PART10_PROPERTY_wLcdLayout Undocumented
Variable PCSCv2_PART10_PROPERTY_wLcdMaxCharacters Undocumented
Variable PCSCv2_PART10_PROPERTY_wLcdMaxLines Undocumented
Variable Properties Undocumented
def getFeatureRequest(cardConnection):

Get the list of Part10 features supported by the reader.

Parameters
cardConnectionCardConnection object
Returns
lista list of list [[tag1, value1], [tag2, value2]]
def getPinProperties(cardConnection, featureList=None, controlCode=None):

return the PIN_PROPERTIES structure

Parameters
cardConnectionCardConnection object
featureListfeature list as returned by getFeatureRequest()
controlCodecontrol code for FEATURE_IFD_PIN_PROPERTIES
Returns
dicta dict
def getTlvProperties(cardConnection, featureList=None, controlCode=None):

return the GET_TLV_PROPERTIES structure

Parameters
cardConnectionCardConnection object
featureListfeature list as returned by getFeatureRequest()
controlCodecontrol code for FEATURE_GET_TLV_PROPERTIES
Returns
dicta dict
def hasFeature(featureList, feature):

return the controlCode for a feature or None

Parameters
featureListfeature list as returned by getFeatureRequest()
featurefeature to look for
Returns
feature value or None
def parseFeatureRequest(response):

Get the list of Part10 features supported by the reader.

Parameters
responseresult of CM_IOCTL_GET_FEATURE_REQUEST commmand
Returns
lista list of list [[tag1, value1], [tag2, value2]]
def parseTlvProperties(response):

return the GET_TLV_PROPERTIES structure

Parameters
responseresult of FEATURE_GET_TLV_PROPERTIES
Returns
dicta dict
CM_IOCTL_GET_FEATURE_REQUEST =

Undocumented

Value
SCARD_CTL_CODE(3400)
FEATURE_ABORT: int =

Undocumented

Value
11
FEATURE_CCID_ESC_COMMAND: int =

Undocumented

Value
19
FEATURE_GET_KEY: int =

Undocumented

Value
16
FEATURE_GET_KEY_PRESSED: int =

Undocumented

Value
5
FEATURE_GET_TLV_PROPERTIES: int =

Undocumented

Value
18
FEATURE_IFD_DISPLAY_PROPERTIES: int =

Undocumented

Value
17
FEATURE_IFD_PIN_PROPERTIES: int =

Undocumented

Value
10
FEATURE_MCT_READER_DIRECT: int =

Undocumented

Value
8
FEATURE_MCT_UNIVERSAL: int =

Undocumented

Value
9
FEATURE_MODIFY_PIN_DIRECT: int =

Undocumented

Value
7
FEATURE_MODIFY_PIN_DIRECT_APP_ID: int =

Undocumented

Value
14
FEATURE_MODIFY_PIN_FINISH: int =

Undocumented

Value
4
FEATURE_MODIFY_PIN_START: int =

Undocumented

Value
3
FEATURE_SET_SPE_MESSAGE: int =

Undocumented

Value
12
FEATURE_VERIFY_PIN_DIRECT: int =

Undocumented

Value
6
FEATURE_VERIFY_PIN_DIRECT_APP_ID: int =

Undocumented

Value
13
FEATURE_VERIFY_PIN_FINISH: int =

Undocumented

Value
2
FEATURE_VERIFY_PIN_START: int =

Undocumented

Value
1
FEATURE_WRITE_DISPLAY: int =

Undocumented

Value
15
Features =

Undocumented

PCSCv2_PART10_PROPERTY_bEntryValidationCondition: int =

Undocumented

PCSCv2_PART10_PROPERTY_bMaxPINSize: int =

Undocumented

PCSCv2_PART10_PROPERTY_bMinPINSize: int =

Undocumented

PCSCv2_PART10_PROPERTY_bPPDUSupport: int =

Undocumented

PCSCv2_PART10_PROPERTY_bTimeOut2: int =

Undocumented

PCSCv2_PART10_PROPERTY_dwMaxAPDUDataSize: int =

Undocumented

PCSCv2_PART10_PROPERTY_sFirmwareID: int =

Undocumented

PCSCv2_PART10_PROPERTY_wIdProduct: int =

Undocumented

PCSCv2_PART10_PROPERTY_wIdVendor: int =

Undocumented

PCSCv2_PART10_PROPERTY_wLcdLayout: int =

Undocumented

PCSCv2_PART10_PROPERTY_wLcdMaxCharacters: int =

Undocumented

PCSCv2_PART10_PROPERTY_wLcdMaxLines: int =

Undocumented

Properties =

Undocumented