-
Notifications
You must be signed in to change notification settings - Fork 85
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
Conversation
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this 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 :)
aba414c
to
ed32cb4
Compare
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>
ed32cb4
to
57b79fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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.