+
     h/$  c                   s   R t ^ RI5 ]! R4      t^t^t^t^t^t^t	^t
^t^	t^
t^t^t^t^t^t^t^t^t^t/ R]bR]bR]bR]bR]bR]	bR	]
bR
]bR]bR]bR]bR]bR]bR]bR]bR]bR]bR]R]/Ct^t^t^t^t^t^t^t^t^	t ^
t!^t"^t#R]R]R]R]R]R]R]R]R] R]!R ]"R!]#/t$]%! ]PM                  4       4       F  t']']]]',          &   K  	  ]%! ]$PM                  4       4       F  t']']$]$]',          &   K  	  R" t(R# t)R$ t*R0R& lt+R0R' lt,R( t-].R)8X  d    ^ R*I/H0t0 ]0Pb                  ! 4       ^ ,          Pe                  4       t3]3Pi                  ]5R+7       ])! ]34      t6]7! ]64       ]7! ]*! ]6]4      4       ]7! ]*! ]6]	4      4       ]+! ]34      t8]7! R,4       ]%! ]8Ps                  4       4       F  w  t't:]7! R-]' R.]: 24       K  	  ]7! R/4       ],! ]34      t8]%! ]8Ps                  4       4       F  w  t't:]7! R-]' R.]: 24       K  	  R%# R%# )1ap  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
)Z*iH  FEATURE_VERIFY_PIN_STARTFEATURE_VERIFY_PIN_FINISHFEATURE_MODIFY_PIN_STARTFEATURE_MODIFY_PIN_FINISHFEATURE_GET_KEY_PRESSEDFEATURE_VERIFY_PIN_DIRECTFEATURE_MODIFY_PIN_DIRECTFEATURE_MCT_READER_DIRECTFEATURE_MCT_UNIVERSALFEATURE_IFD_PIN_PROPERTIESFEATURE_ABORTFEATURE_SET_SPE_MESSAGE FEATURE_VERIFY_PIN_DIRECT_APP_ID FEATURE_MODIFY_PIN_DIRECT_APP_IDFEATURE_WRITE_DISPLAYFEATURE_GET_KEYFEATURE_IFD_DISPLAY_PROPERTIESFEATURE_GET_TLV_PROPERTIESFEATURE_CCID_ESC_COMMAND!PCSCv2_PART10_PROPERTY_wLcdLayout0PCSCv2_PART10_PROPERTY_bEntryValidationCondition PCSCv2_PART10_PROPERTY_bTimeOut2(PCSCv2_PART10_PROPERTY_wLcdMaxCharacters#PCSCv2_PART10_PROPERTY_wLcdMaxLines"PCSCv2_PART10_PROPERTY_bMinPINSize"PCSCv2_PART10_PROPERTY_bMaxPINSize"PCSCv2_PART10_PROPERTY_sFirmwareID#PCSCv2_PART10_PROPERTY_bPPDUSupport(PCSCv2_PART10_PROPERTY_dwMaxAPDUDataSize PCSCv2_PART10_PROPERTY_wIdVendor!PCSCv2_PART10_PROPERTY_wIdProductc                s6   . p\        V 4      ^ 8  dv   V ^ ,          pV ^,          ^,          V ^,          ,           ^,          V ^,          ,           ^,          V ^,          ,           p VP                  \        V,          V.4       V R K  V#   \         d     Li ; i)zGet the list of Part10 features supported by the reader.

@param response: result of L{CM_IOCTL_GET_FEATURE_REQUEST} command

@rtype: list
@return: a list of list C{[[tag1, value1], [tag2, value2]]}
:Ni   N)lenZappendFeaturesKeyError)responsefeaturestagcontrols   &   @/usr/lib64/python3.14/site-packages/smartcard/pcsc/PCSCPart10.pyparseFeatureRequestr'   n   s     H
h-!
qkq HQK/A5!DJQK	OOXc]G45 RLO  		s   %B
 
BBc                sD    V P                  \        . 4      p\        V4      # )zGet the list of Part10 features supported by the reader.

@param cardConnection: L{CardConnection} object

@rtype: list
@return: a list of list C{[[tag1, value1], [tag2, value2]]}
)r%   CM_IOCTL_GET_FEATURE_REQUESTr'   )cardConnectionr"   s   & r&   getFeatureRequestr*      s"     %%&BBGHx((    c                s|    V  F5  pV^ ,          V8X  g   \         V^ ,          ,          V8X  g   K,  V^,          u # 	  R# )zreturn the controlCode for a feature or None

@param feature:     feature to look for
@param featureList: feature list as returned by L{getFeatureRequest()}

@return: feature value or None
N)r    )featureListZfeatureZfs   && r&   
hasFeaturer-      s1     Q47?hqtn7Q4K r+   Nc                s    Vf    Vf   \        V 4      p\        V\        4      pVf   R. /# V P                  V. 4      pRVRV^ ,          RV^,          RV^,          RV^,          /pV# )zreturn the C{PIN_PROPERTIES} structure

@param cardConnection: L{CardConnection} object
@param featureList: feature list as returned by L{getFeatureRequest()}
@param controlCode: control code for L{FEATURE_IFD_PIN_PROPERTIES}

@rtype: dict
@return: a dictrawZ
LcdLayoutXZ
LcdLayoutYZEntryValidationConditionZTimeOut2)r*   r-   r	   r%   )r)   r,   controlCoder"   ds   &&&  r&   getPinPropertiesr1      s     +N;K .HIr{%%k26Hxhqkhqk"HQKHQK	A Hr+   c                s    Vf    Vf   \        V 4      p\        V\        4      pVf   R. /# V P                  V. 4      p\	        V4      # )a  return the C{GET_TLV_PROPERTIES} structure

@param cardConnection: L{CardConnection} object
@param featureList: feature list as returned by L{getFeatureRequest()}
@param controlCode: control code for L{FEATURE_GET_TLV_PROPERTIES}

@rtype: dict
@return: a dictr.   )r*   r-   r   r%   parseTlvProperties)r)   r,   r/   r"   s   &&& r&   getTlvPropertiesr3      sT     +N;K .HIr{%%k26Hh''r+   c                sZ   RV /p\        V 4      pV'       d   V^ ,          pV^,          pV^^V,            p\        V8X  d,   RP                  V Uu. uF  p\        V4      NK  	  up4      pM^V8X  d   V^ ,          pMu^V8X  d    V^,          R,          V^ ,          ,           pMO^V8X  dI   V^,          R,          V^,          ,           R,          V^,          ,           R,          V^ ,          ,           p WQ\        V,          &   V^ ^V,           1 EK  V# u upi   \
         d    YQR&    L'i ; i)zreturn the GET_TLV_PROPERTIES structure

@param response: result of  L{FEATURE_GET_TLV_PROPERTIES}

@rtype: dict
@return: a dictr.   Z i   ZUNKNOWN)listr   ZjoinZchr
Propertiesr!   )r"   r0   Ztmpr$   r   ZdataZcs   &      r&   r2   r2      s    	x	A
 x.C
!f!f1q3w-477D1DqCFD12D#X7D#X7S=47*D#X!Ws]T!W,3d1g=DtAwND	 !%jo AGH) 2  	 iL	 s   D3D D*)D*Z__main__)
PCSCReader)Zmodez
PinProperties:Z z: z
TlvProperties:)NN);Z__doc__Zsmartcard.scardZSCARD_CTL_CODEr(   r    r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r    r   r   r   r   r   r   r   r   r   r   r   r   r5   r4   ZkeysZkr'   r*   r-   r1   r3   r2   Z__name__Zsmartcard.pcsc.PCSCReaderr6   ZreadersZcreateConnectionZccZconnectZSCARD_SHARE_DIRECTr#   ZprintZ
propertiesZitemsZv) r+   r&   <module>r7      s}  0   .d3               !  #'  #'   !% !   8!:  8  !:	
 6  !:  !:  !: 2 !"< ] 6 '(H '(H 2  !" %&D#$ !"< 8'. %& !34 0#$  +, (&' #%& "%& "%& "&' #+- (#%  $& ! ()J68h&(H.0X)+N(*L(*L(*L)+N.0X&(H')J
" 
hmmo	AHXa[ 
 
joo	 A !Jz!} 
!,	)
:(*(V z:4				a	 	1	1	3BJJ&J' !$H	(O	*X7
89	*X8
9:!"%J	
Z%%'(1!Bqcl ) 

!"%JZ%%'(1!Bqcl )+ r+   