daemon: Add gost checksum command support

gostsum - generates or checks GOST R34.11-94 message digests
gost12sum - generates or checks GOST R34.11-2012 message digests

A reference implementation https://github.com/gost-engine/engine

Fixes: https://github.com/libguestfs/libguestfs/pull/132
Signed-off-by: Alexey Shabalin <shaba@altlinux.org>

[RWMJ: Added documentation, and added gostsum package to
the appliance]
This commit is contained in:
Alexey Shabalin
2024-01-12 13:27:57 +03:00
committed by Richard W.M. Jones
parent e9a728bb22
commit f878f72430
3 changed files with 13 additions and 1 deletions

View File

@@ -256,6 +256,7 @@ file
findutils
gawk
gdisk
gostsum
grep
gzip
jfsutils

View File

@@ -46,8 +46,12 @@ program_of_csum (const char *csumtype)
return "sha384sum";
else if (STRCASEEQ (csumtype, "sha512"))
return "sha512sum";
else if (STRCASEEQ (csumtype, "gost"))
return "gostsum";
else if (STRCASEEQ (csumtype, "gost12"))
return "gost12sum";
else {
reply_with_error ("unknown checksum type, expecting crc|md5|sha1|sha224|sha256|sha384|sha512");
reply_with_error ("unknown checksum type, expecting crc|md5|sha1|sha224|sha256|sha384|sha512|gost|gost12");
return NULL;
}
}

View File

@@ -2652,6 +2652,13 @@ parameter which must have one of the following values:
Compute the cyclic redundancy check (CRC) specified by POSIX
for the C<cksum> command.
=item C<gost>
=item C<gost12>
Compute the checksum using GOST R34.11-94 or
GOST R34.11-2012 message digest.
=item C<md5>
Compute the MD5 hash (using the L<md5sum(1)> program).