fix: update client key uri without restarting tedge-p11-server#3772
Merged
Bravo555 merged 3 commits intothin-edge:mainfrom Sep 10, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Contributor
Robot Results
|
5787e87 to
d49fe21
Compare
d49fe21 to
478b634
Compare
3aca834 to
ec5d52b
Compare
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
ec5d52b to
07e0ce6
Compare
Bravo555
approved these changes
Sep 3, 2025
This fixes an issue where C_GetSlotList isn't properly updated when a new slot is created Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
07e0ce6 to
0812ea3
Compare
reubenmiller
commented
Sep 10, 2025
Contributor
Author
reubenmiller
left a comment
There was a problem hiding this comment.
Approved (though since I created the original PR my approval doesn't count)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Support changing the pkcs11 client key uri without requiring a restart of the tedge-p11-server.Call
C_Initializeagain soC_GetSlotListreturns updated slot list.PR should be rebased after #3771 is merged
Types of changes
Paste Link to the issue
#3766
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments
According to PKCS #11 Version 2.40 Specification, Section 5.5
C_GetSlotList:In our case, SoftHSM2 is an example of such a library:
C_GetSlotListcallsslotManager.getSlotList()getSlotListreads fromslotsslotsis initialized in the constructorSlotManageris created whenC_Initializeis calledThe disadvantage of that approach is we have to call
dlopenagain, per request, and in some environments this can be very slow apparently, but unless we can empirically confirm that this poses a problem, we'll proceed with this. Other libraries may be more reasonable and refresh the list onC_GetSlotListlength request, as the spec suggests, but as we primarily develop and test against SoftHSM2, we'll proceed with this for now.