-
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
sc-hsm: Change SO-PIN broken after commit 440289a #267
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: