]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/tpm2-util.c
tpm2-util: add helper that checks for the various facets of TPM2 support
authorLennart Poettering <lennart@poettering.net>
Tue, 19 Apr 2022 12:42:27 +0000 (14:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 20 Apr 2022 14:58:18 +0000 (16:58 +0200)
commitba578556288f5d6f16a94fda702178b349beca85
tree9e8ea903defd8de4666e83b503e2b6ad6b86cae8
parent47a9f91760bf7a44cb96c386d2b3f32cce5a1d89
tpm2-util: add helper that checks for the various facets of TPM2 support

So far we were a bit sloppy regarding checks for TPM2 support. Let's
make things more precise and introduce a single helper that checks for
three axis of TPM2 support: whether we have a loaded kernel driver,
whether the firmware used it, and whether we ourselves are compiled for
it.

This only adds the helper. Follow-up patches will use it at various
places.
src/shared/tpm2-util.c
src/shared/tpm2-util.h