-
Notifications
You must be signed in to change notification settings - Fork 58
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
Implement get_ek() function #151
Conversation
src/tpm.rs
Outdated
|
||
pub(crate) fn get_ek() -> Result<KeyHandle> { | ||
let cfg_handle = | ||
config_get("/etc/keylime.conf", "cloud_agent", "ek_handle")?; |
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.
Perhaps have the function take an &str
of the config value, and use that? Basically, I think it would be nice if this just did the parsing into a KeyHandle
, and let the config handling over to the main functions.
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.
@puiterwijk Let me know if this shorter version is more like what you're talking about here. I can revise if not.
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.
Other than one small nitpick, looks good!
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.
Actually, it might be useful to get a test added. But the code looks good to me. |
16f1f95
to
b5a563b
Compare
@puiterwijk I added some tests. I didn't see a way to get a value back out of a |
Signed-off-by: Lily Sturmann <[email protected]>
Signed-off-by: Lily Sturmann <[email protected]>
Looks good to me! Thanks! |
Resolves #115
I changed the name
to.get_ek()
because that seems like what it does (rather than "use" the ek)Please let me know if I should make changes or if this isn't the right way to generate the key handle.