]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fundamental: rename tpm-pcr.h → tpm2-pcr.h 28948/head
authorLennart Poettering <lennart@poettering.net>
Thu, 24 Aug 2023 09:24:02 +0000 (11:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 Aug 2023 11:40:37 +0000 (13:40 +0200)
I always found it confusing that most of our TPM related definitions are
in tpm2-util.h, but the PCR names in tpm-pcr.h, without the "2". Let's
fix that and make this systematic, in particular as the definitions in
the file all start with TPM2_ already.

No code flow changes, just some renaming.

src/boot/efi/measure.c
src/boot/efi/stub.c
src/boot/measure.c
src/boot/pcrphase.c
src/creds/creds.c
src/cryptenroll/cryptenroll.c
src/cryptsetup/cryptsetup.c
src/fundamental/tpm2-pcr.h [moved from src/fundamental/tpm-pcr.h with 100% similarity]
src/partition/repart.c
src/shared/efi-loader.c
src/shared/tpm2-util.h

index 4dc42831bfea05088d4ca6e86bdc77ff349529e1..677fe640153f55392ba699cd472c86b7e62cb673 100644 (file)
@@ -5,7 +5,7 @@
 #include "macro-fundamental.h"
 #include "measure.h"
 #include "proto/tcg.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "util.h"
 
 static EFI_STATUS tpm1_measure_to_pcr_and_event_log(
index 8d3a10601f8280621087cce7dcf269b83ce3b4e2..e34fc77faa563ca0af437bed4ecb269215a91dae 100644 (file)
@@ -13,7 +13,7 @@
 #include "secure-boot.h"
 #include "shim.h"
 #include "splash.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "uki.h"
 #include "util.h"
 #include "version.h"
index abd562f72e9a7868609136dba0ccf88616edc19b..a62caf8a3ff0a1c6238774cd899717dbc5f08ae3 100644 (file)
@@ -18,7 +18,7 @@
 #include "pretty-print.h"
 #include "sha256.h"
 #include "terminal-util.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "tpm2-util.h"
 #include "uki.h"
 #include "verbs.h"
index 19401168dd2673d18fb69b6dba572c2b322043fb..08285d73184c1ebe0f514d3012af9c9e10e08cf8 100644 (file)
@@ -18,7 +18,7 @@
 #include "openssl-util.h"
 #include "parse-argument.h"
 #include "pretty-print.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "tpm2-util.h"
 
 static bool arg_graceful = false;
index 57f4aa68098627cf82e2bffbf0a4dff9bcca90a3..0bc55a36d208cd99157f331b9665d3ea9de120f7 100644 (file)
@@ -22,7 +22,7 @@
 #include "stat-util.h"
 #include "string-table.h"
 #include "terminal-util.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "tpm2-util.h"
 #include "verbs.h"
 
index 2bf3333132a01a1c44a18a6f131d8cc1c9ff98df..1ffa2fb5f2d2a0c84c17c2652e1e9165574cf74d 100644 (file)
@@ -27,7 +27,7 @@
 #include "string-table.h"
 #include "strv.h"
 #include "terminal-util.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 
 static EnrollType arg_enroll_type = _ENROLL_TYPE_INVALID;
 static char *arg_unlock_keyfile = NULL;
index ced815f11cee783775b53be8fc5752afdf18998d..adf881dc5c56d9cb2936d95c2f2cd140405ab50b 100644 (file)
@@ -40,7 +40,7 @@
 #include "random-util.h"
 #include "string-table.h"
 #include "strv.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "tpm2-util.h"
 
 /* internal helper */
index ab10b9acbf1c8dbc032c43fbfb1268dd2bd9f125..e403012e92dd79fb2cb882cdab94ab00c796ba91 100644 (file)
@@ -68,9 +68,9 @@
 #include "string-util.h"
 #include "strv.h"
 #include "sync-util.h"
-#include "tmpfile-util.h"
 #include "terminal-util.h"
-#include "tpm-pcr.h"
+#include "tmpfile-util.h"
+#include "tpm2-pcr.h"
 #include "tpm2-util.h"
 #include "user-util.h"
 #include "utf8.h"
index 5fd9351ff4b690fa3f2a56167fd4688dd69de2ee..7cbd69bfb0abd1cdd8fcb31e57f7d3086a050152 100644 (file)
@@ -7,7 +7,7 @@
 #include "path-util.h"
 #include "stat-util.h"
 #include "strv.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 #include "utf8.h"
 
 #if ENABLE_EFI
index 2ae1a8809f92904a07c511944fa489c21633597b..62d46d69a3d2647fc88373d400170dae0e920f29 100644 (file)
@@ -9,7 +9,7 @@
 #include "macro.h"
 #include "openssl-util.h"
 #include "sha256.h"
-#include "tpm-pcr.h"
+#include "tpm2-pcr.h"
 
 typedef enum TPM2Flags {
         TPM2_FLAGS_USE_PIN = 1 << 0,
@@ -316,7 +316,7 @@ int tpm2_util_pbkdf2_hmac_sha256(const void *pass,
                     uint8_t res[static SHA256_DIGEST_SIZE]);
 
 enum {
-        /* Additional defines for the PCR index naming enum from "fundamental/tpm-pcr.h" */
+        /* Additional defines for the PCR index naming enum from "fundamental/tpm2-pcr.h" */
         _TPM2_PCR_INDEX_MAX_DEFINED = TPM2_PCRS_MAX,
         _TPM2_PCR_INDEX_INVALID     = -EINVAL,
 };