[Toybox] protect against sha*sum misconfiguration?

enh enh at google.com
Thu Aug 22 12:54:17 PDT 2019


i accidentally ended up with a toybox binary that had the sha*sum
binaries enabled, but TOYBOX_LIBCRYPTO disabled. this silently output
md5sums instead. seems like a compile-time error would have been
ideal, and a run-time error still better than just silently doing the
wrong thing.

runtime's easy enough; something like

  if (!CFG_TOYBOX_LIBCRYPTO) error_exit("toybox built without libcrypto");

in sha1sum_main (which implements all the sha*sums). but i feel like a
build-time check would be better, and i'm not sure about the right way
to write that?



More information about the Toybox mailing list