Skip to content

Store the current object ID in token#106

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
LinuxJedi:token-storage-fixes
Jun 27, 2025
Merged

Store the current object ID in token#106
dgarske merged 1 commit into
wolfSSL:masterfrom
LinuxJedi:token-storage-fixes

Conversation

@LinuxJedi
Copy link
Copy Markdown
Member

@LinuxJedi LinuxJedi commented Jun 27, 2025

When a token is stored and then reloaded during C_Initialize, the token object IDs are reset to zero. Which means new objects will end up with the same IDs as loaded objects.

This is probably a "bad thing", so let's not do that. With this patch the next object ID is stored with the token.

Also:

  • Fix MD5 breaking tests with wolfSSL#8895 change.
  • Fix parallel tests storage race condition

@LinuxJedi LinuxJedi force-pushed the token-storage-fixes branch 5 times, most recently from 16d8d9f to 2d9fad9 Compare June 27, 2025 13:34
Copy link
Copy Markdown
Member

@dgarske dgarske left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and tested. Great otherwise

Comment thread tests/object_id_uniqueness_test.c Outdated
Comment thread tests/object_id_uniqueness_test.c Outdated
Comment thread tests/object_id_uniqueness_test.c Outdated
@LinuxJedi LinuxJedi force-pushed the token-storage-fixes branch 6 times, most recently from fc46745 to 4eccc62 Compare June 27, 2025 17:19
@LinuxJedi LinuxJedi requested a review from dgarske June 27, 2025 17:23
Comment thread configure.ac Outdated
@LinuxJedi LinuxJedi force-pushed the token-storage-fixes branch from 4eccc62 to fc2f22f Compare June 27, 2025 17:27
Comment thread wolfpkcs11/options.h.in Outdated
When a token is stored and then reloaded during `C_Initialize`, the
token object IDs are reset to zero. Which means new objects will end up
with the same IDs as loaded objects.

This is probably a "bad thing", so let's not do that. With this patch
the next object ID is stored with the token.

Also:

* Fix MD5 breaking tests with wolfSSL#8895 change.
* Fix parallel tests storage race condition
@LinuxJedi LinuxJedi force-pushed the token-storage-fixes branch from fc2f22f to a9f8e8d Compare June 27, 2025 17:34
@LinuxJedi LinuxJedi requested a review from dgarske June 27, 2025 17:34
@dgarske dgarske merged commit ed48205 into wolfSSL:master Jun 27, 2025
41 checks passed
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