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

pkcs11-tool test suite fails on latest SoftHSM #2926

Open
jclc opened this issue Nov 5, 2023 · 1 comment
Open

pkcs11-tool test suite fails on latest SoftHSM #2926

jclc opened this issue Nov 5, 2023 · 1 comment

Comments

@jclc
Copy link

jclc commented Nov 5, 2023

Problem Description

The test suite assumes SoftHSM tokens can be created and accessed on slot 0, however this behaviour is no longer supported by SoftHSM. When creating a token in SoftHSM, it will automatically assign it to a random slot. According to the developers, this is by design.

This makes it impossible to test new features added or to be added to the latest SoftHSM versions.

This should be a relatively simple change, but if OpenSC depends on a specific version in its CI pipelines that would need to be updated as well.

Proposed Resolution

Check assigned slot after softhsm_initialize and append --slot $SLOT to $PKCS11_TOOL

Steps to reproduce

make check

Logs

@Jakuje
Copy link
Member

Jakuje commented Nov 6, 2023

Do you have some example of the failed test runs? I think this behavior is in softhsm for quite some time already, but pkcs11 tool skips uninitialized slots in the tests (but I might be wrong or there might be some case not covered).

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