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

sc-hsm: CKR_USER_NOT_LOGGED_IN in C_Sign immediately after C_GenerateKeyPair #698

Closed
CardContact opened this issue Mar 2, 2016 · 0 comments

Comments

@CardContact
Copy link
Member

A C_Sign issued in the same session in which the private/public key pair is generated fails with CKR_USER_NOT_LOGGED_IN.

The issue is caused by a SELECT(AID) invoked before using the private key. The SELECT resets the authentication state. The SELECT(AID) is issued by the code, because the private key has an associated path, automatically set in the PKCS#15 layer for newly generated keys.

For keys already existing on the device, the path is not set during initialization, so that the additional SELECT(AID) is suppressed.

CardContact pushed a commit to CardContact/OpenSC that referenced this issue Mar 2, 2016
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

No branches or pull requests

1 participant