PC/SC: don't reset the card on disconnection

Windows/macOS (minidriver/tokend) handle the authentication status and
perform an explicit logout on shutdown. PKCS#11 standard requires a
session for logging into the card; when closing the session we perform
an explicit logout. Hence, the authentication status should be reset
even if not performing a reset on disconnect.
This commit is contained in:
Frank Morgner 2018-01-16 10:59:15 +01:00
parent 490e825a65
commit 74553a5a8f
2 changed files with 3 additions and 3 deletions

View File

@ -84,8 +84,8 @@ app default {
#
# What to do when disconnecting from a card (SCardDisconnect)
# Valid values: leave, reset, unpower.
# Default: reset
# disconnect_action = unpower;
# Default: leave
# disconnect_action = reset;
#
# What to do at the end of a transaction (SCardEndTransaction)
# Valid values: leave, reset, unpower.

View File

@ -781,7 +781,7 @@ static int pcsc_init(sc_context_t *ctx)
gpriv->connect_exclusive =
scconf_get_bool(conf_block, "connect_exclusive", gpriv->connect_exclusive);
gpriv->disconnect_action =
pcsc_reset_action(scconf_get_str(conf_block, "disconnect_action", "reset"));
pcsc_reset_action(scconf_get_str(conf_block, "disconnect_action", "leave"));
gpriv->transaction_end_action =
pcsc_reset_action(scconf_get_str(conf_block, "transaction_end_action", "leave"));
gpriv->reconnect_action =