Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
libsecret supports binding the encryption key used for the file backend to a TPM, which offers security benefits over just deriving it from the user’s login password: https://gnome.pages.gitlab.gnome.org/libsecret/libsecret-tpm2.html
This change adds the option
withTpm2Tss
to enable building with TPM support. I suggest to enable it by default on x86-64 considering the almost universal prevalence of TPMs on x86-64 desktop systems.The option
abrmdSupport
is used to enable support for the user‐space TPM resource manager. When enabled,libtss2-tcti-tabrmd.so
andlibtss2-tcti-device.so
are added to the library’s dependencies to enable loading at run‐time.libsecret requires a TPM resource manager, but works fine with the kernel‐space resource manager (
/dev/tpmrm0
). When using an emulated TPM (swtpm), a user‐space resource manager (abrmd) has to be used.Things done
I tested this change on nixpkgs master.
The package tests run successfully and I manually tested
secret-tool
using the hardware TPM of my computer (NixOS x86-64) and the kernel‐space resource manager.nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.