summaryrefslogtreecommitdiff
path: root/chip/g/upgrade_fw.c
diff options
context:
space:
mode:
authornagendra modadugu <ngm@google.com>2016-04-27 00:07:11 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-05-31 23:58:31 -0700
commitaca616c551d635a9e3bcfd627b26cede69abb419 (patch)
tree64139b9eaf1a6123af43e4de7f7f991aff239f01 /chip/g/upgrade_fw.c
parentabe2a55191dbcdf8c92bfea64601b607471d75be (diff)
downloadchrome-ec-aca616c551d635a9e3bcfd627b26cede69abb419.tar.gz
CR50: port dcrypto/cr50 code to depend on third_party/cryptoc
Port SHA and P256 code to depend on third_party/cryptoc. Remove config options CONFIG_SHA1, and CONFIG_SHA256 as these are provided by third_party/cryptoc. Also remove unused config options CONFIG_SHA384, CONFIG_SHA512. Crypto functions prefixed by dcrypto_ (declared in internal.h ), DCRYPTO_ (declared in dcrypto.h) are implemented under chip/g/dcrypto, and otherwise are implemented under third_party/cryptoc. BRANCH=none BUG=chrome-os-partner:43025,chrome-os-partner:47524,chrome-os-partner:53782 TEST=all tests in test/tpm_test/tpmtest.py pass Change-Id: If7da02849aba9703573559370af5fae721d594fc Signed-off-by: nagendra modadugu <ngm@google.com> Reviewed-on: https://chromium-review.googlesource.com/340853 Commit-Ready: Nagendra Modadugu <ngm@google.com> Tested-by: Nagendra Modadugu <ngm@google.com> Reviewed-by: Nagendra Modadugu <ngm@google.com> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'chip/g/upgrade_fw.c')
-rw-r--r--chip/g/upgrade_fw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/g/upgrade_fw.c b/chip/g/upgrade_fw.c
index 8cc2f2ceda..045a934448 100644
--- a/chip/g/upgrade_fw.c
+++ b/chip/g/upgrade_fw.c
@@ -11,9 +11,10 @@
#include "hooks.h"
#include "include/compile_time_macros.h"
#include "memory.h"
-#include "sha1.h"
#include "uart.h"
+#include "cryptoc/sha.h"
+
#define CPRINTF(format, args...) cprintf(CC_EXTENSION, format, ## args)
/* Various upgrade extension command return values. */
@@ -91,7 +92,7 @@ void fw_upgrade_command_handler(void *body,
{
struct upgrade_command *cmd_body = body;
uint8_t *rv = body;
- uint8_t sha1_digest[SHA1_DIGEST_SIZE];
+ uint8_t sha1_digest[SHA_DIGEST_SIZE];
size_t body_size;
uint32_t block_offset;