-
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
Enable hex values to be used for tpm_ownerpassword #769
Conversation
8195d1a
to
a930cef
Compare
d830deb
to
79db4aa
Compare
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 couple of minor nits, but otherwise it looks good to me.
keylime-agent/src/main.rs
Outdated
let auth = if tpm_ownerpassword.starts_with("hex:") { | ||
let (_, hex_ownerpassword) = tpm_ownerpassword.split_at(4); | ||
let decoded_ownerpassword = hex::decode(hex_ownerpassword) | ||
.map_err(|_| { |
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.
Not sure if this manual conversion is required, as FromHex
error is already defined.
f5cc63f
to
7a80b1f
Compare
Thanks for the feedback, I have made both changes and merged into one commit. |
Signed-off-by: Isaac-Matthews <[email protected]>
7a80b1f
to
fb65f89
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@THS-on Hi, could you please mark your request as solved? Otherwise I cannot merge this. |
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.
@ansasaki done
This fixes #760.
If a TPM has been set up with a non-string auth value, for example by running:
tpm2_changeauth -c E "hex:0000DF0237BE41C0E0124CAAD0A619B29B8E3EE4173521656729C6F339DBC449"
the keylime agent is not currently compatible with the TPM as there is no way provide this value.
This fixes the issue, by checking for "hex:" at the start of the tpm password and using a hex password if it is found.