-
Notifications
You must be signed in to change notification settings - Fork 117
Add TPM 1.2 support #462
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
base: master
Are you sure you want to change the base?
Add TPM 1.2 support #462
Conversation
556332d to
04d5e9f
Compare
2c32eb7 to
a7de265
Compare
b4cc648 to
e83e669
Compare
dc1c5c3 to
40bfdf4
Compare
|
Work is done, pre-built packages for Debian 12 and amd64 arch are available here https://github.com/oldium/clevis/releases/tag/v20_tpm1 |
000c78a to
b79a306
Compare
|
Rebased to latest master to fix the build. |
Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
This is a weak requirement, so when TCSD is missing, it does not influence the Clevis askpass service startup. Similarly if the TCSD startup fails, it does not affect the Clevis askpass service startup. Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
Signed-off-by: Oldřich Jedlička <[email protected]>
The command fails in Docker or otherwise limited environments, so skip the test when it is not usable. Signed-off-by: Oldřich Jedlička <[email protected]>
…oot) [code-review] Unnecessary keyword. Signed-off-by: Oldřich Jedlička <[email protected]>
…oot) [code-review] Check return value. Signed-off-by: Oldřich Jedlička <[email protected]>
[code-review] Check return value. Signed-off-by: Oldřich Jedlička <[email protected]>
[code-review] Update wording. Signed-off-by: Oldřich Jedlička <[email protected]>
[code-review] Unify the function signatures. Signed-off-by: Oldřich Jedlička <[email protected]>
Add forgotten copyright header. Signed-off-by: Oldřich Jedlička <[email protected]>
Fix PCR bank and sealing fail logic. Signed-off-by: Oldřich Jedlička <[email protected]>
Add missing local variable declaration. Signed-off-by: Oldřich Jedlička <[email protected]>
Fix PCR bank and sealing fail logic in test. Signed-off-by: Oldřich Jedlička <[email protected]>
Fix usage of uninitialized ${orig} value. Also test exactly the string
without having newlines added by echo.
Signed-off-by: Oldřich Jedlička <[email protected]>
Fix usage of uninitialized ${orig} value. Also test exactly the string
without having newlines added by echo.
Signed-off-by: Oldřich Jedlička <[email protected]>
|
Would this play nicely together with #467? Anything missing? Great for proxmox ZFS root on older TPM 1.2 only hardware. |
Hard to say without looking more into the ZFS support. I see some code duplication in the ZFS initramfs hook, it installs basically the same binaries as the regular clevis hook. It misses TPM1.2 completely (for obvious reasons). From the brief look I was not able to tell how exactly the ZFS unlocking works, but if it uses the same clevis functionality to decrypt the password, it should (in theory) work. Side note: I have rebased my patches and changed them according to code-review input plus few fixes more (also for easier packaging of the new |
|
Possibly there will be some startup changes necessary to line-up with the ZFS support, because the clevis initramfs Anyway, nothing impossible to do. |
Signed-off-by: Oldřich Jedlička <[email protected]>
|
Added several On top of the code-review fixes, I added the following:
On top of that, I created a new |

This patch series adds TPM 1.2 support and fixes few other things (I can split this into multiple Pull Requests if you wish):
DefaultDependencies=no.Status:
clevis-encrypt-tpm1Example usage:
clevis luks bind -d /dev/<device> tpm1 '{"pcr_ids":"0,4,7"}'echo test | clevis encrypt tpm1 '{"pcr_ids":"0,4,7"}' | clevis decryptTested:
"fail":trueto test success and failed unlockingrd.neednetthe unlocking happens after network gets online.Fixes: #84, #456