systemd-integritysetup: accept integrity-algorithm=xxhash64

Signed-off-by: Daniel Dawson <danielcdawson@gmail.com>
This commit is contained in:
Daniel Dawson 2024-09-26 17:44:03 -07:00 committed by Lennart Poettering
parent bfc48578eb
commit 0c96911afb
3 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@
</varlistentry>
<varlistentry>
<term><option>integrity-algorithm=[crc32c|crc32|sha1|sha256|hmac-sha256]</option></term>
<term><option>integrity-algorithm=[crc32c|crc32|xxhash64|sha1|sha256|hmac-sha256]</option></term>
<listitem><para>
The algorithm used for integrity checking. The default is crc32c. Must match option used during format.

View File

@ -8,7 +8,7 @@
static int supported_integrity_algorithm(char *user_supplied) {
if (!STR_IN_SET(user_supplied, "crc32", "crc32c", "sha1", "sha256", "hmac-sha256"))
if (!STR_IN_SET(user_supplied, "crc32", "crc32c", "xxhash64", "sha1", "sha256", "hmac-sha256"))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unsupported integrity algorithm (%s)", user_supplied);
return 0;
}

View File

@ -52,7 +52,7 @@ fi
# Do one iteration with a separate data device, to test those branches
separate_data=1
for algorithm in crc32c crc32 sha1 sha256
for algorithm in crc32c crc32 xxhash64 sha1 sha256
do
if [ "${separate_data}" -eq 1 ]; then
data_option="--data-device=${image_dir}/data"