Skip to content

Conversation

Jakuje
Copy link
Collaborator

@Jakuje Jakuje commented Aug 12, 2025

This allows selecting new object types, profiles, from the token and reading their attributes, consisting of a profile ID the token implements:

https://docs.oasis-open.org/pkcs11/pkcs11-profiles/v3.1/os/pkcs11-profiles-v3.1-os.html

The specs is a bit vague and my understanding is that the profiles can overlap, but are not always superset of some other profile, which makes me thinking the token can have several profile objects.

Currently, this is not implemented by neither kryoptic nor softhsm, but I filled a RFE for kryoptic (latchset/kryoptic#305) so once we will have it in, I will try to write some test.

Jakuje added 2 commits August 12, 2025 14:29
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
hug-dev
hug-dev previously approved these changes Sep 3, 2025
Copy link
Member

@hug-dev hug-dev left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

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

Looks good in general, a couple of nits if you don't mind :)

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
error: hiding a lifetime that's elided elsewhere is confusing
   --> cryptoki/src/session/object_management.rs:227:25
    |
227 |     pub fn iter_objects(&self, template: &[Attribute]) -> Result<ObjectHandleIterator> {
    |                         ^^^^^ the lifetime is elided here        -------------------- the same lifetime is hidden here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
help: use `'_` for type paths
    |
227 |     pub fn iter_objects(&self, template: &[Attribute]) -> Result<ObjectHandleIterator<'_>> {
    |                                                                                      ++++

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

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

Thanks!

@hug-dev hug-dev merged commit 2765af6 into parallaxsecond:main Sep 9, 2025
43 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