diff options
author | Eric Biggers <ebiggers@google.com> | 2019-06-26 17:25:52 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-06-26 17:25:52 -0700 |
commit | 6033f555d1cb9c17abf3b860922d3ae6457cb1b1 (patch) | |
tree | 996472762d975f4507c0962ed689ed295e947f8d | |
parent | 10696edab6436f21a8e7c564571d302c751f5d9c (diff) | |
download | fsverity-utils-6033f555d1cb9c17abf3b860922d3ae6457cb1b1.tar.gz |
cmd_sign: print file measurement on success
Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r-- | cmd_sign.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -540,6 +540,7 @@ int fsverity_cmd_sign(const struct fsverity_command *cmd, const char *keyfile = NULL; const char *certfile = NULL; struct fsverity_signed_digest *digest = NULL; + char digest_hex[FS_VERITY_MAX_DIGEST_SIZE * 2 + 1]; u8 *sig = NULL; u32 sig_size; int status; @@ -618,6 +619,9 @@ int fsverity_cmd_sign(const struct fsverity_command *cmd, if (!write_signature(argv[1], sig, sig_size)) goto out_err; + bin2hex(digest->digest, hash_alg->digest_size, digest_hex); + printf("Signed file \"%s\" (%s:%s)\n", argv[0], hash_alg->name, + digest_hex); status = 0; out: free(salt); |