Skip to content

Commit

Permalink
Make the libcaliptra test verify LMS signatures by default.
Browse files Browse the repository at this point in the history
Previously LMS signatures were ignored. This enables `lms_verify` in the fuse register by default. It can be skipped by defining an environment variable. For example:

```
SKIP_LMS_VERIFY=1 make run
```
  • Loading branch information
zhalvorsen committed Jan 31, 2025
1 parent 3b76999 commit 2eb9d2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcaliptra/examples/generic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ static void set_fuses(test_info* info)
fuses->owner_pk_hash[x] = __builtin_bswap32(((uint32_t*)opk_hash)[x]);
fuses->key_manifest_pk_hash[x] = __builtin_bswap32(((uint32_t*)vpk_hash)[x]);
}

#if !defined(SKIP_LMS_VERIFY)
fuses->lms_verify = true;
#endif
}

static struct caliptra_buffer read_file_or_exit(const char* path)
Expand Down
3 changes: 3 additions & 0 deletions libcaliptra/examples/hwmodel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ BUILDER_PATH = ../../../builder
# main sources don't need a command line.
DEFINES = -DROM_PATH=\"$(ROM_FILE)\"
DEFINES += -DFW_PATH=\"$(FW_FILE)\"
ifdef SKIP_LMS_VERIFY
DEFINES += -DSKIP_LMS_VERIFY=\"$(SKIP_LMS_VERIFY)\"
endif

# HW MODEL
HWMODEL_DIR = $(OUTPUT_DIR)
Expand Down

0 comments on commit 2eb9d2e

Please sign in to comment.