Add CKO_MECHANISM objects and add CKA_UNIQUE_ID to all objects#421
Open
simo5 wants to merge 3 commits intolatchset:mainfrom
Open
Add CKO_MECHANISM objects and add CKA_UNIQUE_ID to all objects#421simo5 wants to merge 3 commits intolatchset:mainfrom
simo5 wants to merge 3 commits intolatchset:mainfrom
Conversation
2df2cc2 to
269817f
Compare
Enable the `v8` feature in the `uuid` crate to support custom UUID generation. Add a new `generate_stable_unique` method to the Object struct that creates deterministic IDs based on the object class and a provided value. Update FIPS validation and profile object creation to use this method for consistent identification. Co-authored-by: Gemini <gemini@google.com> Signed-off-by: Simo Sorce <simo@redhat.com>
Generate CKO_MECHANISM objects for each supported mechanism during token initialization. This allows applications to query for supported mechanisms using the object search API. Update the object search filter to treat CKO_MECHANISM and CKO_VALIDATION as built-in types to ensure they are discoverable. Include a test case verifying the existence and attributes of these new objects. Co-authored-by: Gemini <gemini@google.com> Signed-off-by: Simo Sorce <simo@redhat.com>
1bc4be7 to
ac1fd9c
Compare
Add a `class` field to the `Object` struct and update `Object::new()` to require the object class as an argument. This allows accessing the class without searching the attribute vector. Update all `ObjectFactory` implementations to store the associated class type upon initialization. Update storage backends to initialize objects with `CK_UNAVAILABLE_INFORMATION` until the class attribute is read. Refactor `is_sensitive()` and `is_extractable()` to rely on the stored class for default behaviors, simplifying the logic for internal objects. Signed-off-by: Simo Sorce <simo@redhat.com>
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.
Description
Add CKA_UNIQUE_ID to all objects, for builtin objects add a stable id so it is always the same on each run
Add CKO_MECHANISM objects, this is not super useful today yet, but come 3.3 it will be the way to discover which parameter sets each mechanism can handle.
Fixes: #417
Fixes: #420
Checklist
Reviewer's checklist: