-
Notifications
You must be signed in to change notification settings - Fork 712
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
Handle get_challenge corner cases #1440
Comments
The (2) is fixed by #1441. The other issues still apply. I will change the title to reflect this. |
Jakuje
changed the title
coolkey: get_challenge is broken
Handle get_challenge corner cases
Jul 30, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Description
The get_challenge() function in coolkey applet is broken. Before 410cdf0 the function was returning some garbage from the heap:
After the refactoring (410cdf0), the card is cycling in the following code:
There are two issues: First of all, coolkey get_random APDU does not work at all. I will need to figure out what is the problem here. Second issue is the handling of the get_random by the OpenSC, which is assuming that if user requested N bytes of random data, the driver will be able to return it.
Proposed Resolution
p11tests
should be extended with this test to avoid issues later.Steps to reproduce
Try to generate random data with coolkey card with master (will cycle forever):
The text was updated successfully, but these errors were encountered: