Skip to content

Commit

Permalink
daemon: Add gost checksum command support
Browse files Browse the repository at this point in the history
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: #132
Signed-off-by: Alexey Shabalin <shaba@altlinux.org>

[RWMJ: Added documentation, and added gostsum package to
the appliance]
  • Loading branch information
shaba authored and rwmjones committed Jan 25, 2024
1 parent e9a728b commit f878f72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions appliance/packagelist.in
Expand Up @@ -256,6 +256,7 @@ file
findutils
gawk
gdisk
gostsum
grep
gzip
jfsutils
Expand Down
6 changes: 5 additions & 1 deletion daemon/checksum.c
Expand Up @@ -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;
}
}
Expand Down
7 changes: 7 additions & 0 deletions generator/actions_core.ml
Expand Up @@ -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).
Expand Down

0 comments on commit f878f72

Please sign in to comment.