Rewrite fsveritysetup in C

Make fsveritysetup a subcommand 'setup' of the 'fsverity' program which
previously had just the 'enable' and 'set_measurement' commands.

When signing the file measurement, use libcrypto directly instead of
invoking the 'openssl' binary.

Similarly, build the Merkle tree in C code (using libcrypto for SHA-256,
or zlib for CRC-32) rather than invoking the 'veritysetup' binary.

Other improvements over the original Python script are included as well.

Signed-off-by: Eric Biggers <ebiggers@google.com>
21 files changed