Skip to content

Conversation

@dengert
Copy link
Member

@dengert dengert commented Oct 26, 2022

Fixes: #2625

OpenSC definitions of ATRs have been lax in "sc_atr_table" entries by allowing 1 bits in the ATR that need to be 0 bits when used with Windows compare Do the equivalent reduction of the table ATR done in card.c by tbin[s] = (tbin[s] & mbin[s]); before adding to registry.

This will then allow lax definitions of ATRs to be copied to customactions.cpp and fixed before adding to registry.

Changes to be committed:
modified: win32/customactions.cpp

Checklist
  • [todo] Windows minidriver is tested

@dengert dengert force-pushed the windows-atr-atrmask branch from 1ddd9c7 to 4fcb222 Compare October 26, 2022 20:33
Include a fix for OpenSC#2625

OpenSC definitions of ATRs have been lax in "sc_atr_table" entries by allowing
1 bits in the ATR that need to be 0 bits when used with Windows compare
Do the equivalent reduction of the table ATR done in card.c by "tbin[s] = (tbin[s] & mbin[s]);"
before adding to registry.

This will then allow lax definitions of ATRs to be copied to customactions.cpp
and fixed before adding to registry.

 Changes to be committed:
	modified:   win32/customactions.cpp
@dengert
Copy link
Member Author

dengert commented Oct 28, 2022

This PR was tested by @pl31 and reported to work in #2626 (comment)

@Jakuje Jakuje merged commit 80ec11f into OpenSC:master Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants