From: Lennart Poettering Date: Thu, 24 Aug 2023 09:24:02 +0000 (+0200) Subject: fundamental: rename tpm-pcr.h → tpm2-pcr.h X-Git-Tag: v255-rc1~629^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28948%2Fhead;p=thirdparty%2Fsystemd.git fundamental: rename tpm-pcr.h → tpm2-pcr.h 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. --- diff --git a/src/boot/efi/measure.c b/src/boot/efi/measure.c index 4dc42831bfe..677fe640153 100644 --- a/src/boot/efi/measure.c +++ b/src/boot/efi/measure.c @@ -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( diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c index 8d3a10601f8..e34fc77faa5 100644 --- a/src/boot/efi/stub.c +++ b/src/boot/efi/stub.c @@ -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" diff --git a/src/boot/measure.c b/src/boot/measure.c index abd562f72e9..a62caf8a3ff 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -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" diff --git a/src/boot/pcrphase.c b/src/boot/pcrphase.c index 19401168dd2..08285d73184 100644 --- a/src/boot/pcrphase.c +++ b/src/boot/pcrphase.c @@ -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; diff --git a/src/creds/creds.c b/src/creds/creds.c index 57f4aa68098..0bc55a36d20 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -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" diff --git a/src/cryptenroll/cryptenroll.c b/src/cryptenroll/cryptenroll.c index 2bf3333132a..1ffa2fb5f2d 100644 --- a/src/cryptenroll/cryptenroll.c +++ b/src/cryptenroll/cryptenroll.c @@ -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; diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index ced815f11ce..adf881dc5c5 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -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 */ diff --git a/src/fundamental/tpm-pcr.h b/src/fundamental/tpm2-pcr.h similarity index 100% rename from src/fundamental/tpm-pcr.h rename to src/fundamental/tpm2-pcr.h diff --git a/src/partition/repart.c b/src/partition/repart.c index ab10b9acbf1..e403012e92d 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -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" diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c index 5fd9351ff4b..7cbd69bfb0a 100644 --- a/src/shared/efi-loader.c +++ b/src/shared/efi-loader.c @@ -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 diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h index 2ae1a8809f9..62d46d69a3d 100644 --- a/src/shared/tpm2-util.h +++ b/src/shared/tpm2-util.h @@ -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, };