SmartCardReader PCSC

[SmartCardReader PCSC]
ComponentDisable=0
ComponentEnable=1
DisconnectStatus=0
ModeAllowUnload=0
ModeCallTrace=0
ModeCheckInfoAllow=none
ModeCheckInfoDeny
ModeCheckPinPad=1
ModeExclusive=0
ModeForceNotification=0
:ModeReuseContext=0
:ModeReuseListContext=0
:ModeSingleConnection=0
:ModeSkipNotification=0
:ModeStayConnected=0
:ModeUnknownPresent=0
:ModeUseCritical=0
:Scope=
StateTimeout=0|{LOCAL-PCSC}||10|{SERVER}||0|*
:WaitService=1

ComponentEnable, ComponentDisable

The ComponentEnable and ComponentDisable are used as a whitelist/blacklist for the PC/SC reader support.

[SmartCardReader PCSC]
ComponentEnable=1
ComponentDisable=0

DisconnectStatus

The DisconnectStatus parameter tells the disconnect status when releasing the smart card.

# define SCARD_LEAVE_CARD   0
# define SCARD_RESET_CARD   1
# define SCARD_UNPOWER_CARD 2

[SmartCardReader PCSC]
DisconnectStatus=0

Values

0

SCARD_LEAVE_CARD, used for performance purposes but may keep PIN verify status. The exact behavior depends on platform and implementation, so it must be verified if this is a problem.

1

SCARD_RESET_CARD, resets PIN verify status.

2

SCARD_UNPOWER_CARD, resets PIN verify status.

ModeAllowUnload

The allow unlock mode is used to tell whether the PC/SC library should be unloaded or not when last connection is closed. Usually, unloading works quite bad if a later reconnect is wanted on some platforms.

[SmartCardReader PCSC]
ModeAllowUnload=0

ModeCallTrace

The call trace mode may be activated to send information about each PC/SC call to the trace.

[SmartCardReader PCSC]
ModeCallTrace=0

ModeCheckInfo

ModeCheckInfo is replaced by ModeCheckInfoAllow and ModeCheckInfoDeny.

ModeCheckInfo gets information from the smart card reader driver. Unfortunately, there are reader drivers that will crash when they get asked, so it should normally be turned off.

[SmartCardReader PCSC]
ModeCheckInfo=1

ModeCheckInfoAllow

ModeCheckInfoAllow is a whitelist of smart card readers for which to make information checks from the smart card reader driver. The information checks can for example be if the smart card reader is a PIN pad or not. Unfortunately, there are reader drivers that will crash when they get asked, so it should normally be turned off.

We recommend that you use either ModeCheckInfoAllow or ModeCheckInfoDeny.

[SmartCardReader PCSC]
ModeCheckInfoAllow=<option>

Values

none

No smart card reader checks are allowed. This is the default value.

any

Allows all smart card reader checks.

<card reader name>

Value is smart a card reader name. Also wildcards (*) can be used.

ModeCheckInfoDeny

ModeCheckInfoDeny is a blacklist of smart card readers for which to deny information checks from the smart card reader driver. The information checks can for example be if the smart card reader is a PIN pad or not.

We recommend that you use either ModeCheckInfoDeny or ModeCheckInfoAllow.

[SmartCardReader PCSC]
ModeCheckInfoDeny=<option>

Values

none

Allows all smart card reader checks.

any

No smart card reader checks are allowed.

<card reader name>

Value is smart a card reader name. Also wildcards (*) can be used.

ModeCheckPinPad

ModeCheckPinPad asks the smart card reader if PIN pad is supported or not. To use this function, ModeCheckInfoAllow or ModeCheckInfoDeny must be activated.

[SmartCardReader PCSC]
ModeCheckPinPad=1

ModeExclusive

There are two modes when talking to PC/SC: either shared or exclusive. Using shared will allow other processes to connect simultaneously and should be considered to best behavior.

[SmartCardReader PCSC]
ModeExclusive=0

ModeForceNotification

There are two modes for detecting smart card reader presence, either ask continuously or wait for a notification. The mode will be decided by the StateTimeout value, but this parameter may enforce the use of notifications even when asking continuously.

[SmartCardReader PCSC]
ModeForceNotification=0

ModeReuseContext

The normal behavior is to open a context towards PC/SC and close it when finished using, but there are implementations available that handles this bad, so we may continue to use the same context without closing it. This parameter is used when connecting towards a smart card.

[SmartCardReader PCSC]
ModeReuseContext=0

ModeReuseListContext

The normal behavior is to open a context towards PC/SC and close it when finished using, but there are implementations available that handles this bad, so we may continue to use the same context without closing it. This parameter is used when scanning for smart card readers (list).

[SmartCardReader PCSC]
ModeReuseListContext=0

ModeSingleConnection

The normal behavior is to have a separate connection when scanning for smart card readers and another connection when connecting the smart cards. This parameter will reuse the same connection for both purposes.

[SmartCardReader PCSC]
ModeSingleConnection=0

ModeSkipNotification

There are two modes for detecting smart card reader presence, either ask continuously or wait for a notification. The mode will be decided by the StateTimeout value, but this parameter will stop the use of notifications even when using notifications for smart card presence.

[SmartCardReader PCSC]
ModeSkipNotification=0

ModeStayConnected

The normal behavior is to release the smart card when finished working with it. This parameter will change the behavior to always connected. Not recommended when working with other processes that want to access the same smart card.

[SmartCardReader PCSC]
ModeStayConnected=0

ModeUnknownPresent

The normal behavior is expecting the smart card reader service to return the correct smart card presence status, but sometimes will unknown be returned. This parameter tells how unknown should be treated.

[SmartCardReader PCSC]
ModeUnknownPresent=0

ModeUseCritical

The normal behavior will be to allow multiple threads access the smart card reader service simultaneously as long as we are accessing different smart card readers. This parameter will block this behavior and require the other thread to be finished before accessing the second reader.

[SmartCardReader PCSC]
ModeUseCritical=0

Scope

The scope tells the access scope.

#define SCARD_SCOPE_USER                0x0000  /* Scope in user space */
#define SCARD_SCOPE_TERMINAL            0x0001  /* Scope in terminal */
#define SCARD_SCOPE_SYSTEM              0x0002  /* Scope in system */
#define SCARD_SCOPE_GLOBAL              0x0003  /* Scope is global */

If not specified, then will the client access with SCOPE_USER for normal user and SCOPE_SYSTEM for system user (root or administrator).

[SmartCardReader PCSC]
:Scope=

StateTimeout

There are two modes for detecting smart card reader presence, either ask continuously or wait for a notification. Will ask continuously if this parameter is set to 0, and use notification if this value is non-zero. The value will be the number of minutes until timeout.

[SmartCardReader PCSC]
StateTimeout=10

WaitService

This variable tells whether the implementation should wait for the PC/SC smart card service to be started.

[SmartCardReader PCSC]
WaitService=1