diff options
author | Elliott Hughes <enh@google.com> | 2019-08-26 10:33:58 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-09-07 03:10:28 -0500 |
commit | 08a810562cfc41f8cc2f51b361b932cbe6e47009 (patch) | |
tree | f5cb4a350fa828be9d6cab6726f46d11d22e2afd /toys/lsb | |
parent | 4d24876eea43076779bc598c91f2110e69905133 (diff) | |
download | toybox-08a810562cfc41f8cc2f51b361b932cbe6e47009.tar.gz |
md5sum: don't allow broken sha-3 sums.
If you accidentally configure the sha-3 sums on, but don't enable
libcrypto, you'll get toys that just output md5 sums instead. This patch
doesn't cause a build-time error (my original plan), but does at least
ensure that toybox refuses to include incorrect sha-3 sum
implementations.
Diffstat (limited to 'toys/lsb')
-rw-r--r-- | toys/lsb/md5sum.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toys/lsb/md5sum.c b/toys/lsb/md5sum.c index 3db25f9c..ff7e8b45 100644 --- a/toys/lsb/md5sum.c +++ b/toys/lsb/md5sum.c @@ -17,10 +17,10 @@ USE_MD5SUM(NEWTOY(md5sum, "bc(check)s(status)[!bc]", TOYFLAG_USR|TOYFLAG_BIN)) USE_SHA1SUM(NEWTOY(sha1sum, "bc(check)s(status)[!bc]", TOYFLAG_USR|TOYFLAG_BIN)) -USE_SHA224SUM(OLDTOY(sha224sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN)) -USE_SHA256SUM(OLDTOY(sha256sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN)) -USE_SHA384SUM(OLDTOY(sha384sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN)) -USE_SHA512SUM(OLDTOY(sha512sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN)) +USE_TOYBOX_LIBCRYPTO(USE_SHA224SUM(OLDTOY(sha224sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN))) +USE_TOYBOX_LIBCRYPTO(USE_SHA256SUM(OLDTOY(sha256sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN))) +USE_TOYBOX_LIBCRYPTO(USE_SHA384SUM(OLDTOY(sha384sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN))) +USE_TOYBOX_LIBCRYPTO(USE_SHA512SUM(OLDTOY(sha512sum, sha1sum, TOYFLAG_USR|TOYFLAG_BIN))) config MD5SUM bool "md5sum" |