summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2return_codes.h
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2016-01-22 15:06:05 -0600
committerchrome-bot <chrome-bot@chromium.org>2016-01-26 14:56:36 -0800
commit7cbd1ced18e6abf63e1017b2d02ad80391b47cd7 (patch)
tree0709b17c9a84679bf50e216f96651de2f394a4d6 /firmware/2lib/include/2return_codes.h
parent6502935d9f610f8d62acf2de2534e5e64ee50643 (diff)
downloadvboot-7cbd1ced18e6abf63e1017b2d02ad80391b47cd7.tar.gz
vb20: add vb2api_check_hash_get_digest() for retrieving hash result
For x86 systems, which resume through the boot reset vector, to implement vboot verification of the memory init code one needs check that the slot chosen on the resume path is the same as the original boot path. That check is done by storing the resulting hash of the slot. However, vb2api doesn't export the resulting hash from vb2api_check_hash(). Thus, provide a variant which saves the resulting digest in the supplied buffer. BUG=chrome-os-partner:46049 BRANCH=glados TEST=Suspended and resumed on chell. Also, tested with an EC build which returns a bad hash to ensure that is properly caught. Change-Id: Ic20be2024afedabc2d8bc767f1b794376348523c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/323460 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2return_codes.h')
-rw-r--r--firmware/2lib/include/2return_codes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/2lib/include/2return_codes.h b/firmware/2lib/include/2return_codes.h
index 4201b693..1d1ed531 100644
--- a/firmware/2lib/include/2return_codes.h
+++ b/firmware/2lib/include/2return_codes.h
@@ -523,6 +523,9 @@ enum vb2_return_code {
/* Phase one passing through secdata's request to reboot */
VB2_ERROR_API_PHASE1_SECDATA_REBOOT,
+ /* Digest buffer passed into vb2api_check_hash incorrect. */
+ VB2_ERROR_API_CHECK_DIGEST_SIZE,
+
/**********************************************************************
* Errors which may be generated by implementations of vb2ex functions.
* Implementation may also return its own specific errors, which should