You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reuse system TPM2TOOLS_TCTI envvar if it is set (#270)
* Flush tpm context cache after each TPM2 operation
Bare TPM2 API handles only small amount of active contexts. Usually 3 at a time. Use of more contexts requires a TPM2 resource manager that transparently loads/saves contexts if needed.
Linux kernel has a built-in tpm2 resource manager that gets activated when one opens '/dev/tpmrmXXX' (in contrast to regular '/dev/tpmXXX' dev file).
But some TPM2 toolset, such as swtpm emulator does not provide a default resource manager. And using the Linux kernel module with swtpm is a bit of pain.
Handle context management by the script itself rather than relying on existing resource manager.
* Reuse system TPM2TOOLS_TCTI envvar if it is set
This is a way to customize TPM used for clevis binding/unbinding.
For example for tests against a TPM software emulator:
TPM2TOOLS_TCTI=swtpm clevis encrypt tpm2 '{}' <<< 'hello, world'
Closes#244
0 commit comments