Skip to content

Add support for Pkcs#11 Profile objects #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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 4 commits August 12, 2025 14:29
Signed-off-by: Jakub Jelen <[email protected]>
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 <[email protected]>
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.

1 participant