]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemd-integritysetup: accept integrity-algorithm=xxhash64
authorDaniel Dawson <danielcdawson@gmail.com>
Fri, 27 Sep 2024 00:44:03 +0000 (17:44 -0700)
committerLennart Poettering <lennart@poettering.net>
Tue, 1 Oct 2024 09:16:14 +0000 (11:16 +0200)
Signed-off-by: Daniel Dawson <danielcdawson@gmail.com>
man/integritytab.xml
src/integritysetup/integrity-util.c
test/units/TEST-67-INTEGRITY.sh

index 519ed1ca0d856590ad915b054677bf605da71134..32561e96f29d95088afb846254bd167709909b61 100644 (file)
       </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.
index c29d4fcd5da847a5da276b23b06e3a72c24b2f6e..bc0fc645d06cb16e033215ceb6004092e71dcfea 100644 (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;
 }
index a42fd66aa54c54d15d909c9321c0070960b0a99a..eb3082d1320ba5895e8ebb148c61269a25e66217 100755 (executable)
@@ -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"