Skip to content

Conversation

@sklemer1
Copy link
Contributor

The pkcs11 unit tests use softhsm as token. Recent Linux distros ship with softhsm2 which had some changes, notably a new config format, new env variables, different slot numbering. This tries to support it by keeping compatibility with softhsm1.

Please note:

  • test_two_sessions now throws a CKR_USER_ALREADY_LOGGED_IN error which I think is right.
  • My openssl version complained about the lower case 'cn' so I changed it.
  • This PR builds upon pkcs11: Use 1st slot as default, not slot '0'. #43
  • I don't have a softhsm1 setup so I can't test the downward compatibility.
  • This PR works nicely with Switch to pyca/cryptography as crypto backend #41 which is the reason I did this in the first place...
  • Because of this everything is just randomly thrown together until it worked -- code quality is rough.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 56.462% when pulling 71cd962 on sklemer1:softhsm2 into 982550b on IdentityPython:master.

@leifj leifj merged commit 7dcc56d into IdentityPython:master Aug 14, 2018
@fredrikt fredrikt mentioned this pull request Aug 14, 2018
@sklemer1 sklemer1 deleted the softhsm2 branch October 17, 2018 13:52
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

Successfully merging this pull request may close these issues.

3 participants