@@ -1199,6 +1199,7 @@ static int calc_evm_hmac(const char *file, const char *keyfile, unsigned char *s
int keylen;
unsigned char evmkey[MAX_KEY_SIZE];
char list[1024];
+ char uuid[16];
ssize_t list_size;
struct h_misc_64 hmac_misc;
int hmac_size;
@@ -1330,6 +1331,18 @@ static int calc_evm_hmac(const char *file, const char *keyfile, unsigned char *s
log_err("EVP_DigestSignUpdate() failed\n");
goto out_ctx_cleanup;
}
+ if (!(hmac_flags & HMAC_FLAG_NO_UUID)) {
+ err = get_uuid(&st, uuid);
+ if (err)
+ goto out_ctx_cleanup;
+
+ err = EVP_DigestSignUpdate(pctx, (const unsigned char *)uuid,
+ sizeof(uuid));
+ if (!err) {
+ log_err("EVP_DigestSignUpdate() failed\n");
+ goto out_ctx_cleanup;
+ }
+ }
err = EVP_DigestSignFinal(pctx, sig, &siglen);
if (err != 1)
log_err("EVP_DigestSignFinal() failed\n");