Skip to content

Conversation

@sklemer1
Copy link
Contributor

@sklemer1 sklemer1 commented Aug 13, 2018

WARNING: this might break some setups but might be a good idea in the long run.

Background:
After init softhsm2 changes the name of a slot. e.g. the first slot gets a random name after initialization (not '0'). This breaks the unit tests (patch for this in #44 ). According to https://issues.opendnssec.org/browse/SUPPORT-190 this is correct behavior and one shouldn't rely on the slot number in the first place. So the 'correct' patch would be to have parse_uri walk through all slots and find the token with the right name/serial/whatever if no slot is given[1]. This said, the 'first' slot might be a better default than '0' because it will always exist, whereas '0' might not (as it's the case with softhsm2). Also, if available, slot '0' should be the first in the list so I suppose in most cases this shouldn't make any difference (but only have one type of hardware token to test this theory at hand).

[1] Code for this might be borrowed from https://ludovicrousseau.blogspot.com/2011/04/pykc11-provided-samples-getinfopy.html

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 56.716% when pulling 37cd85e on sklemer1:p11slot into 982550b on IdentityPython:master.

@leifj leifj merged commit 37cd85e into IdentityPython:master Aug 14, 2018
@sklemer1 sklemer1 deleted the p11slot 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