summaryrefslogtreecommitdiffstats
path: root/src/shared/creds-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-01-05 14:45:15 +0100
committerGitHub <noreply@github.com>2024-01-05 14:45:15 +0100
commit3289aba5a0e6baa54f17f3358665b1197054a3b4 (patch)
tree8eab5b0642c8e4070fed7a7c0ab09543e286cc8f /src/shared/creds-util.h
parentMerge pull request #30784 from poettering/json-dispatch-enum (diff)
parenttpm2-util: more iovec'ification (diff)
downloadsystemd-3289aba5a0e6baa54f17f3358665b1197054a3b4.tar.xz
systemd-3289aba5a0e6baa54f17f3358665b1197054a3b4.zip
Merge pull request #30754 from poettering/iovecification
tpm2-util: convert various things over to struct iovec rather that data ptr + size
Diffstat (limited to 'src/shared/creds-util.h')
-rw-r--r--src/shared/creds-util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/creds-util.h b/src/shared/creds-util.h
index b34dba7cc2..38d5086e8c 100644
--- a/src/shared/creds-util.h
+++ b/src/shared/creds-util.h
@@ -53,7 +53,7 @@ typedef enum CredentialSecretFlags {
CREDENTIAL_SECRET_FAIL_ON_TEMPORARY_FS = 1 << 2,
} CredentialSecretFlags;
-int get_credential_host_secret(CredentialSecretFlags flags, void **ret, size_t *ret_size);
+int get_credential_host_secret(CredentialSecretFlags flags, struct iovec *ret);
int get_credential_user_password(const char *username, char **ret_password, bool *ret_is_hashed);
@@ -77,5 +77,5 @@ int get_credential_user_password(const char *username, char **ret_password, bool
#define _CRED_AUTO SD_ID128_MAKE(a2,19,cb,07,85,b2,4c,04,b1,6d,18,ca,b9,d2,ee,01)
#define _CRED_AUTO_INITRD SD_ID128_MAKE(02,dc,8e,de,3a,02,43,ab,a9,ec,54,9c,05,e6,a0,71)
-int encrypt_credential_and_warn(sd_id128_t with_key, const char *name, usec_t timestamp, usec_t not_after, const char *tpm2_device, uint32_t tpm2_hash_pcr_mask, const char *tpm2_pubkey_path, uint32_t tpm2_pubkey_pcr_mask, const void *input, size_t input_size, void **ret, size_t *ret_size);
-int decrypt_credential_and_warn(const char *validate_name, usec_t validate_timestamp, const char *tpm2_device, const char *tpm2_signature_path, const void *input, size_t input_size, void **ret, size_t *ret_size);
+int encrypt_credential_and_warn(sd_id128_t with_key, const char *name, usec_t timestamp, usec_t not_after, const char *tpm2_device, uint32_t tpm2_hash_pcr_mask, const char *tpm2_pubkey_path, uint32_t tpm2_pubkey_pcr_mask, const struct iovec *input, struct iovec *ret);
+int decrypt_credential_and_warn(const char *validate_name, usec_t validate_timestamp, const char *tpm2_device, const char *tpm2_signature_path, const struct iovec *input, struct iovec *ret);