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: Change SO-PIN broken after commit 440289a #267

Closed
CardContact opened this issue Jul 13, 2014 · 0 comments
Closed

sc-hsm: Change SO-PIN broken after commit 440289a #267

CardContact opened this issue Jul 13, 2014 · 0 comments

Comments

@CardContact
Copy link
Member

Changing the SO-PIN using pkcs11-tool fails with CKR_PIN_LEN_RANGE after the maximum length of the user PIN was reduced from 16 to 15.

The bug can be verified with

./pkcs11-tool --module ../pkcs11/.libs/opensc-pkcs11.so --login --login-type so --so-pin 3537363231383830 --change-pin --new-pin 3537363231383830

Apparently pkcs15_change_pin() in framework-pkcs15.c picks the wrong auth object. It seems like it always picks the first (User PIN) object rather than the SO-PIN object. Because the SO-PIN is (min=16/max=16) and the PIN is now (min=6/max=15) the call fails.

@CardContact CardContact changed the title sc-hsm: Change SO-PIN broken after commit 440289a09113d19d83b20cfecd2ba8dd98ba5826 sc-hsm: Change SO-PIN broken after commit 440289a Jul 13, 2014
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

2 participants