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

CAC issues #1120

Merged
merged 4 commits into from
Aug 4, 2017
Merged

CAC issues #1120

merged 4 commits into from
Aug 4, 2017

Conversation

Jakuje
Copy link
Member

@Jakuje Jakuje commented Aug 2, 2017

These commits resolve the following issues in CAC driver:

Checklist
  • Tested with the following card: Various CAC cards
    • tested PKCS#11

if (r == SC_ERROR_INS_NOT_SUPPORTED) {
/* The CACv1 instruction is not recognized. Try with CACv2 */
card->type = SC_CARD_TYPE_CAC_II;
goto cac2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid goto for anything else than cleanup. See frankmorgner@1fad8ea for a suggestion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I probably ran out of creative ideas after hours of debugging. The attached commit should do the job. I will try tomorrow.

@frankmorgner frankmorgner merged commit 0dcf673 into OpenSC:master Aug 4, 2017
@Jakuje Jakuje mentioned this pull request Nov 3, 2017
2 tasks
metsma pushed a commit to metsma/OpenSC that referenced this pull request Dec 6, 2017
* cac: Make the retransmitted APDU valid by restoring the resplen

* cac: Check SWs for all the APDUs and report the errors to underlying layers

* cac: Fallback from CACv1 to CACv2 when CACv1 instruction is not recognized

for the lack of other pointers how to recongnize them

* avoid goto
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.

None yet

2 participants