summaryrefslogtreecommitdiff
path: root/src/mts_fpga_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mts_fpga_hash.c')
-rw-r--r--src/mts_fpga_hash.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mts_fpga_hash.c b/src/mts_fpga_hash.c
index 7bd4da4..e895040 100644
--- a/src/mts_fpga_hash.c
+++ b/src/mts_fpga_hash.c
@@ -39,6 +39,10 @@ static const char *valid_mtcdt_hashes[] = {
"d9f811fcab57947db3c2323242885a32a7f095a069d3386a148466e7f3da5353", /* v28*/
"903c1199df46d38683b1aa9fc88310abe2f317c01c3aefa77987990874aba420", /* v31*/
"7c190506b969aea6198daffb6c9b47685f3a4dc3ce18565c66542bac27d6f24e"};/* v33*/
+
+static const char *valid_mtcdt3_hashes[] = {
+ "54e41b186b2c91f1bcf249648c50357165d361101fc4fe20ee9b8f0c40dce25d"};/* v35*/
+
static const char *valid_mtcap_hashes[] = {
"07317fe9ca59393c074215c9d923d8d01025654883291a5e89b27d21668e2263", /* v28*/
"f208ef5cae03e703951bb8799172a5eaadb74ddb90bf3e65c32030c008a88e75", /* v31*/
@@ -114,6 +118,14 @@ int sha256_file(char* hw, char *path) {
}
}
}
+ else if (strstr(hw, MTCDT3)) {
+ for(i = 0; i < sizeof(valid_mtcdt3_hashes)/sizeof(valid_mtcdt3_hashes[0]); ++i) {
+ if(!strcmp(valid_mtcdt3_hashes[i], file_hash)) {
+ printf("File verified\n");
+ return MTAC_SUCCESS;
+ }
+ }
+ }
else if (strstr(hw, MTCDT)) {
for(i = 0; i < sizeof(valid_mtcdt_hashes)/sizeof(valid_mtcdt_hashes[0]); ++i) {
if(!strcmp(valid_mtcdt_hashes[i], file_hash)) {