Skip to content

Commit

Permalink
Must pass non-nil iccm and dccm
Browse files Browse the repository at this point in the history
  • Loading branch information
swenson committed Feb 22, 2025
1 parent 96825fa commit 33d074e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/dpe_verification/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ func getHWModel() *C.struct_caliptra_model {
params.rom.data = (*C.uchar)(cRom)
params.rom.len = C.uintptr_t(len(rom))

// use a dummy value for iccm and dccm because they have to be non-nil
iccm := C.CBytes([]byte{0})
defer C.free(iccm)
params.iccm.data = (*C.uchar)(iccm)
params.iccm.len = C.uintptr_t(0)
dccm := C.CBytes([]byte{0})
defer C.free(dccm)
params.dccm.data = (*C.uchar)(dccm)
params.dccm.len = C.uintptr_t(0)

status := C.caliptra_model_init_default(params, &CALIPTRA_C_MODEL)
if status != 0 {
panic("Failed to initialize caliptra model")
Expand Down

0 comments on commit 33d074e

Please sign in to comment.