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

Improve code and fix sign bugs #1306

Merged
merged 2 commits into from
Apr 11, 2018
Merged

Improve code and fix sign bugs #1306

merged 2 commits into from
Apr 11, 2018

Conversation

FeitianSmartcardReader
Copy link
Contributor

@FeitianSmartcardReader FeitianSmartcardReader commented Mar 31, 2018

  1. In epass2003_set_security_env, remove unused code, add condition
    check of ec and rsa
  2. Line 1709 - add return check of hash_data
  3. In epass2003_decipher API, the old sign using apdu.le = 256, now add
    condition check of rsa
  4. Line 2731-2734 - After login successful, need get session status,
    adjust code, improve condition check of data->cmd.
Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • Tested with the following card:
    • tested PKCS#11
    • tested Windows Minidriver
    • tested macOS Tokend

1. In epass2003_set_security_env, remove unused code, add condition
check of ec and rsa
2. Line 1709 - add return check of hash_data
3. In epass2003_decipher API, the old sign using apdu.le = 256, now add
condition check of rsa
4. Line 2731-2734 - After login successful, need get session status,
adjust code, improve condition check of data->cmd.
@@ -2680,15 +2696,18 @@ epass2003_pin_cmd(struct sc_card *card, struct sc_pin_cmd_data *data, int *tries

data->pin1.max_tries = maxtries;
}

return r;
// return r;
Copy link
Member

Choose a reason for hiding this comment

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

I think you accidentally added a comment here, because you're running into external_key_auth, when SC_PIN_CMD_GET_INFO is requested...

@frankmorgner
Copy link
Member

the rest of the code looks good, though

@frankmorgner frankmorgner added this to To do in Release 0.18.0 Apr 5, 2018
@frankmorgner
Copy link
Member

@FeitianSmartcardReader have you looked at the comment above?

@FeitianSmartcardReader
Copy link
Contributor Author

@frankmorgner Sorry, just back from holiday, check now and reply you later, thanks

Add comments for remove line 2700
@frankmorgner
Copy link
Member

Thanks! Could you fill in the checklist above with the test status?

@FeitianSmartcardReader
Copy link
Contributor Author

@frankmorgner The windows minidriver I haven't test, if need, I should can do test tomorrow.

@frankmorgner frankmorgner merged commit 7b24908 into OpenSC:master Apr 11, 2018
Release 0.18.0 automation moved this from To do to Done Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants