tools:acrn-crashlog: Change the algorithm of generating event key

Acrnprobe is using SHA to generate ids for events. These ids are only used
to index events, not for cryptographic purpose.

This patch unify the generating algorithm of short and long ids to
SHA256.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Acked-by: Chen Gang <gang.c.chen@intel.com>
This commit is contained in:
Liu, Xinwu
2018-09-11 16:48:47 +08:00
committed by lijinxia
parent b1ba12ae1b
commit 876cc68311
5 changed files with 71 additions and 155 deletions

View File

@@ -11,6 +11,7 @@
#include <openssl/sha.h>
#include <ext2fs/ext2fs.h>
#include "event_queue.h"
#include "probeutils.h"
#define CONTENT_MAX 10
#define EXPRESSION_MAX 5
@@ -38,7 +39,7 @@ struct vm_t {
ext2_filsys datafs;
unsigned long history_size[SENDER_MAX];
char *history_data;
char last_synced_line_key[SENDER_MAX][SHA_DIGEST_LENGTH + 1];
char last_synced_line_key[SENDER_MAX][SHORT_KEY_LENGTH + 1];
};
struct log_t {