-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use the new abstraction on the PKCS11 interface #301
Conversation
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 really nice and slick, great improvement 😄 We can try and expand our supported algorithms and operations now
Ok(psa_asymmetric_encrypt::Result { | ||
ciphertext: session | ||
.encrypt(&mech, key, &op.plaintext) | ||
.map_err(to_response_status)? | ||
.into(), | ||
}) |
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.
Nice and compact
I will wait for the Christmas period before merging this, waiting to see any comment on the |
The |
db93861
to
bbd2358
Compare
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
let mut flags = Flags::new(); | ||
let _ = flags.set_rw_session(true).set_serial_session(true); |
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.
A bit weird, but I guess it's ok (saying this because the setters for Flags
are in the middle between normal setters and builder setters, so you can do this chaining, but the variable has to be mutable and you have to let _
the last return).
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.
Yes, might be worth a rework at some point!
Use everything from the
new
module inpkcs11
.Close #272