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

Add create_ek() to tpm.rs #141

Merged
merged 2 commits into from Nov 23, 2020
Merged

Add create_ek() to tpm.rs #141

merged 2 commits into from Nov 23, 2020

Conversation

lkatalin
Copy link
Contributor

If this needs more functionality, different return types, etc., please let me know.

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.

This looks decent with just one small comment!

src/tpm.rs Outdated
let alg = match alg {
Some(a) => a,
None => {
// TODO: What other values could be in keylime.conf?
Copy link
Member

Choose a reason for hiding this comment

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

I think the only other value we should consider correct is ecc.
I'd say that the _ => should return an error instead.

@lkatalin lkatalin force-pushed the ekcreate branch 2 times, most recently from 8f5023c to 9fd1faf Compare November 12, 2020 22:33
@lkatalin
Copy link
Contributor Author

Here is an updated PR with an error for encryption algorithms other than rsa and ecc, and retrieving the TPM pub object and turning it into a Vec<u8>.

I don't think that turning the TPM pub object into a Vec<u8> should return KeylimeError::InvalidRequest; it seems better to return a TPM(tss_esapi::Error::WrapperError(...WrapperErrorKind::WrongValueFromTPM)), but I wasn't able to create one because it would not let me import WrapperErrorKind. Any thoughts on the best Error type here? If we end up just using an error from Keylime, I will drop the import of the tss_esapi::Error.

@lkatalin lkatalin force-pushed the ekcreate branch 2 times, most recently from 5e864b4 to a090d7d Compare November 19, 2020 00:20
@lkatalin
Copy link
Contributor Author

Depends on #145 #144

fedora-keylime and others added 2 commits November 23, 2020 13:46
Signed-off-by: Lily Sturmann <lsturman@redhat.com>
@puiterwijk puiterwijk merged commit 031deea into keylime:master Nov 23, 2020
@lkatalin lkatalin mentioned this pull request Dec 3, 2020
@lkatalin lkatalin mentioned this pull request Jan 5, 2021
@lkatalin lkatalin deleted the ekcreate branch July 16, 2021 17:16
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.

None yet

2 participants