-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for request_key and keyctl_instantiate #13
base: main
Are you sure you want to change the base?
Conversation
@mythi Thanks for the PR! It looks great, will try to finish the review this weekend. Left one comment for your question about "NULL" callouts. |
Thanks, I think the comment is missing (at least I cannot see it). I pushed one small fix to |
src/keyring.rs
Outdated
pub fn request_key<D: AsRef<str> + ?Sized, C: AsRef<str> + ?Sized>( | ||
&self, | ||
description: &D, | ||
callout: &C, |
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.
I think having this as Option<&C>
and then updating ffi::request_key
to provide core::ptr::null
when the Option is None
would be nice from a user perspective. Instead of checking for ""
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.
I thought about the same but dropped the idea in the initial ver. I've have that now implemented. AFAUI, Option<&C>
wants type hint so the param becomes None::<&str>
.
70758d7
to
d76f9f2
Compare
(pushed with one lint error fixed that I just discovered) |
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
the rustdoc content is based on 'man request_key'. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Fixes: #12