in tpm2-tools one thing that destroys CLI ergonomics as temporary files that you trash your filesystem with.
I have:
❯ cargo run context list
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
Running `target/debug/tpm2sh context list`
context://4a77dd6d38efc808 primary ecc-nist-p256(sha256)
context://83b9e6c06223acd6 secondary ecc-nist-p256(sha256)
context://e227342ffe74a76c secondary rsa-2048(sha256)
❯ cargo run session list
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
Running `target/debug/tpm2sh session list`
tpm://0x02000000 hmac
tpm://0x03000001 policy
At start tpm2sh does refresh for both lists:
1. context load+save+flush for keys
2. context load+save for sessions
And detects stale loads and deletes those entries i.e, those from previous power cycle.
When one refers to contexts or sessions these URIs must be used as references. All the data is stored at ~/.cache/tpm2sh/.
Inorder to bring cross-compatibility with tpm2-tools load-command supports loading context files and migrating them to tpm2sh caches.
#linux #tpm