summaryrefslogtreecommitdiffstats
path: root/src/creds
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-11-20 18:00:35 +0100
committerLennart Poettering <lennart@poettering.net>2024-01-05 17:20:05 +0100
commit9c3d8db990ae9601ac434f56e9f1d2f82026bda6 (patch)
tree363c4f12e908ad6701ed26229fc2483afc530ff2 /src/creds
parentMerge pull request #30754 from poettering/iovecification (diff)
downloadsystemd-9c3d8db990ae9601ac434f56e9f1d2f82026bda6.tar.xz
systemd-9c3d8db990ae9601ac434f56e9f1d2f82026bda6.zip
creds-util: optionally, allow NULL credentials even with TPM
Diffstat (limited to 'src/creds')
-rw-r--r--src/creds/creds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c
index 01b2844dd3..c9d1a6e8d9 100644
--- a/src/creds/creds.c
+++ b/src/creds/creds.c
@@ -429,6 +429,7 @@ static int verb_cat(int argc, char **argv, void *userdata) {
arg_tpm2_device,
arg_tpm2_signature,
&IOVEC_MAKE(data, size),
+ /* flags= */ 0,
&plaintext);
if (r < 0)
return r;
@@ -501,6 +502,7 @@ static int verb_encrypt(int argc, char **argv, void *userdata) {
arg_tpm2_public_key,
arg_tpm2_public_key_pcr_mask,
&plaintext,
+ /* flags= */ 0,
&output);
if (r < 0)
return r;
@@ -589,6 +591,7 @@ static int verb_decrypt(int argc, char **argv, void *userdata) {
arg_tpm2_device,
arg_tpm2_signature,
&input,
+ /* flags= */ 0,
&plaintext);
if (r < 0)
return r;
@@ -1029,6 +1032,7 @@ static int vl_method_encrypt(Varlink *link, JsonVariant *parameters, VarlinkMeth
arg_tpm2_public_key,
arg_tpm2_public_key_pcr_mask,
p.text ? &IOVEC_MAKE_STRING(p.text) : &p.data,
+ /* flags= */ 0,
&output);
if (r < 0)
return r;
@@ -1103,6 +1107,7 @@ static int vl_method_decrypt(Varlink *link, JsonVariant *parameters, VarlinkMeth
arg_tpm2_device,
arg_tpm2_signature,
&p.blob,
+ /* flags= */ 0,
&output);
if (r == -EBADMSG)
return varlink_error(link, "io.systemd.Credentials.BadFormat", NULL);