summaryrefslogtreecommitdiffstats
path: root/src/creds
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-11-20 16:22:33 +0100
committerLennart Poettering <lennart@poettering.net>2024-01-04 22:56:48 +0100
commit6d78dc282721b3b40e8474222ff8c6e0aebb6d10 (patch)
tree9ee688ab5ae53e80b2daaa8624e8fc461fe8d022 /src/creds
parentfind-esp: adjust parameter indentating to our usual coding style (diff)
downloadsystemd-6d78dc282721b3b40e8474222ff8c6e0aebb6d10.tar.xz
systemd-6d78dc282721b3b40e8474222ff8c6e0aebb6d10.zip
creds: rename "tpm2-absent" encryption to "null" encryption
This is what it is after all: encryption with a NULL key. This is more descriptive, but also relevant since we want to use this kind of credentials in a different context soon: for carrying pcrlock data into a UKI. In that case we don#t want encryption, since the pcrlock data is intended to help unlocking secrets, hence should not be a secret itself. This only changes the code labels and the way this is labelled in the output. We retain compat with the old name.
Diffstat (limited to 'src/creds')
-rw-r--r--src/creds/creds.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c
index 5586baff9a..f84eee292b 100644
--- a/src/creds/creds.c
+++ b/src/creds/creds.c
@@ -843,8 +843,8 @@ static int parse_argv(int argc, char *argv[]) {
arg_with_key = CRED_AES256_GCM_BY_HOST_AND_TPM2_HMAC;
else if (STR_IN_SET(optarg, "host+tpm2-with-public-key", "tpm2-with-public-key+host"))
arg_with_key = CRED_AES256_GCM_BY_HOST_AND_TPM2_HMAC_WITH_PK;
- else if (streq(optarg, "tpm2-absent"))
- arg_with_key = CRED_AES256_GCM_BY_TPM2_ABSENT;
+ else if (STR_IN_SET(optarg, "null", "tpm2-absent"))
+ arg_with_key = CRED_AES256_GCM_BY_NULL;
else
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unknown key type: %s", optarg);