Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
frankmorgner committed Jan 16, 2018
commit 80c11d76d32c08091741cd600932ff50e951473c
4 changes: 2 additions & 2 deletions etc/opensc.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/libopensc/reader-pcsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down