mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-28 06:33:36 +02:00

The default hash algorithm for evmctl is today hardcoded in the libimaevm.c file. To facilitate package maintainers across different distributions to set their own default hash algorithm, this patch adds the --with-default-hash=<algo> option to the configuration script. The chosen algorithm will then be checked by its available in the kernel, otherwise IMA won't be able to verify files hashed by the user. For that, the kernel header hash_info.h used as the source of supported hashes. In case the hash_info.h header is not present, the configuration script warns about it, but uses whatever the user specified in the option. Signed-off-by: Bruno Meneguele <bmeneg@redhat.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>