diff options
author | Claudio Carvalho <cclaudio@linux.vnet.ibm.com> | 2017-12-09 02:52:19 -0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-18 21:30:57 -0600 |
commit | 3ab91fbec937830f184108a244795a2e05cb275c (patch) | |
tree | b98fb42fb1d4d72cc88c669a9bef4a1cf19c4131 /libstb/drivers | |
parent | 060ff18d4ddcfb87e9aa31fc5eadaf4318bca9bb (diff) | |
download | talos-skiboot-3ab91fbec937830f184108a244795a2e05cb275c.tar.gz talos-skiboot-3ab91fbec937830f184108a244795a2e05cb275c.zip |
libstb/secureboot.c: import sb_verify() from stb.c
This imports the sb_verify() function from stb.c, but now it calls the
CVC verify wrapper in order to verify signed firmware images. The
hw-key-hash and hw-key-hash-size initialized in secureboot.c are passed
to the CVC verify function wrapper.
In secureboot.c, the sb_verify() is renamed to secureboot_verify(). The
sb_verify() calls are updated in a subsequent patch.
Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libstb/drivers')
-rw-r--r-- | libstb/drivers/romcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstb/drivers/romcode.c b/libstb/drivers/romcode.c index 94bd42c8..d914ba10 100644 --- a/libstb/drivers/romcode.c +++ b/libstb/drivers/romcode.c @@ -42,7 +42,7 @@ static sha2_hash_t *hw_key_hash = NULL; * func_ptr is the ROM code function address, followed * by additional parameters as necessary */ -ROM_response call_rom_verify(void *func_ptr, ROM_container_raw *container, +ROM_response __cvc_verify_v1(void *func_ptr, ROM_container_raw *container, ROM_hw_params *params); void call_rom_SHA512(void *func_ptr, const uint8_t *data, size_t len, uint8_t *digest); @@ -54,7 +54,7 @@ static int romcode_verify(void *container) memset(&hw_params, 0, sizeof(ROM_hw_params)); memcpy(&hw_params.hw_key_hash, hw_key_hash, sizeof(sha2_hash_t)); - rc = call_rom_verify(romcode_base_addr + ROMCODE_VERIFY_OFFSET, + rc = __cvc_verify_v1(romcode_base_addr + ROMCODE_VERIFY_OFFSET, (ROM_container_raw*) container, &hw_params); if (rc != ROM_DONE) { /* |