You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running the p11test from opensc with recent 2.7.0 update, the C_GetInterfaceList called with both NULL arguments returns unexpected return code CKR_SLOT_ID_INVALID , which is
Oh, this API is not yet implemented in softhsm, so it must be coming from the pkcs11-spy ... but clearly there is something odd going on, which was not there in the last version reelase.
oh, It looks like the GetFunctionList returns the API version 3, but not implementing the C_GetInterfaceList() API, which sounds like going against the specification.
In this structure ‘version’ is the cryptoki specification version number. The major and minor versions must be set to 0x02 and 0x28 indicating a version 2.40 compatible structure.
Activity
Jakuje commentedon Jan 13, 2026
Calling also with the first NULL argument results in the same error:
while the specification clearly says that its valid use and it should return the count of interfaces provided by this module.
https://github.com/OpenSC/OpenSC/blob/master/src/tests/p11test/p11test_case_interface.c#L56
Please, fix the API to be up to the specs
Jakuje commentedon Jan 13, 2026
Oh, this API is not yet implemented in softhsm, so it must be coming from the pkcs11-spy ... but clearly there is something odd going on, which was not there in the last version reelase.
Jakuje commentedon Jan 13, 2026
oh, It looks like the GetFunctionList returns the API version 3, but not implementing the
C_GetInterfaceList()API, which sounds like going against the specification.pkcs11-spy: Avoid buffer overrun with bad modules
pkcs11-spy: Avoid buffer overrun with bad modules
pkcs11-spy: Avoid buffer overrun with bad modules
pkcs11-spy: Avoid buffer overrun with bad modules
bukka commentedon Jan 22, 2026
Yeah this should be added. I bumped the API version because of upcoming ML-DSA changes but forgot that this should be added.
antoinelochet commentedon May 16, 2026
Could you check the implementation I did in #874 ?
Jakuje commentedon May 18, 2026
Sorry, but its 1 commit of 5000 lines of code. I was not able to dig it out from that pile of changes.
antoinelochet commentedon May 18, 2026
That's fair, I am sorry. Changes related to C_GetInterfaceList are in the main.cpp file
https://github.com/antoinelochet/SoftHSMv2/blob/0539a2ec23cf2e37909040319577eb0f8b5e79ac/src/lib/main.cpp#L128
then
https://github.com/antoinelochet/SoftHSMv2/blob/0539a2ec23cf2e37909040319577eb0f8b5e79ac/src/lib/main.cpp#L1356
Jakuje commentedon May 18, 2026
On the first sight, I do not see any issue there. Thanks for the pointer and for working on that!
antoinelochet commentedon Jun 22, 2026
#874 being merged, I think we can close this issue.
Jakuje commentedon Jun 22, 2026
Thank you! I will test it as soon as it will be in a release!