From: Daniel Dawson Date: Fri, 27 Sep 2024 00:44:03 +0000 (-0700) Subject: systemd-integritysetup: accept integrity-algorithm=xxhash64 X-Git-Tag: v257-rc1~353 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c96911afb67fc1632866548efe151f6f10191b0;p=thirdparty%2Fsystemd.git systemd-integritysetup: accept integrity-algorithm=xxhash64 Signed-off-by: Daniel Dawson --- diff --git a/man/integritytab.xml b/man/integritytab.xml index 519ed1ca0d8..32561e96f29 100644 --- a/man/integritytab.xml +++ b/man/integritytab.xml @@ -125,7 +125,7 @@ - + The algorithm used for integrity checking. The default is crc32c. Must match option used during format. diff --git a/src/integritysetup/integrity-util.c b/src/integritysetup/integrity-util.c index c29d4fcd5da..bc0fc645d06 100644 --- a/src/integritysetup/integrity-util.c +++ b/src/integritysetup/integrity-util.c @@ -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; } diff --git a/test/units/TEST-67-INTEGRITY.sh b/test/units/TEST-67-INTEGRITY.sh index a42fd66aa54..eb3082d1320 100755 --- a/test/units/TEST-67-INTEGRITY.sh +++ b/test/units/TEST-67-INTEGRITY.sh @@ -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"