Skip to content
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

Merged
merged 3 commits into from
Jan 5, 2021
Merged

Implement get_ek() function #151

merged 3 commits into from
Jan 5, 2021

Conversation

lkatalin
Copy link
Contributor

@lkatalin lkatalin commented Dec 10, 2020

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.

@lkatalin lkatalin requested a review from puiterwijk December 10, 2020 18:12
src/tpm.rs Outdated

pub(crate) fn get_ek() -> Result<KeyHandle> {
let cfg_handle =
config_get("/etc/keylime.conf", "cloud_agent", "ek_handle")?;
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@puiterwijk puiterwijk left a 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!

@lkatalin lkatalin changed the title Useek Implement get_ek() function Dec 10, 2020
@lkatalin lkatalin requested a review from puiterwijk December 10, 2020 19:18
Copy link
Member

@puiterwijk puiterwijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@puiterwijk
Copy link
Member

Actually, it might be useful to get a test added. But the code looks good to me.

@lkatalin lkatalin force-pushed the useek branch 4 times, most recently from 16f1f95 to b5a563b Compare December 16, 2020 23:34
@lkatalin
Copy link
Contributor Author

@puiterwijk I added some tests. I didn't see a way to get a value back out of a KeyHandle, so I didn't test converting it back.

@puiterwijk
Copy link
Member

Looks good to me! Thanks!

@lukehinds lukehinds merged commit 671ecc5 into keylime:master Jan 5, 2021
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.

Implement use EK Function
3 participants