summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2019-05-22 17:25:01 -0700
committerDuncan Laurie <dlaurie@google.com>2019-05-23 00:37:54 +0000
commit89a586ed1731fd123a43a6375123cb878fa77714 (patch)
tree3c17c780a5310d171ba1b2a09e225ea90c1370db
parenta32d2df033257f50602e8b2ede0e9e67395a7059 (diff)
downloadvboot-89a586ed1731fd123a43a6375123cb878fa77714.tar.gz
Revert "vboot: remove NEED_VB2_SHA_LIBRARY switch"
This reverts commit eade8c4dad3ef9b01ae754085602222d87dc0825. BUG=none TEST=none Change-Id: I781e594b347349e0aff23da67c9732c844ef84a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1626764 Reviewed-by: Duncan Laurie <dlaurie@google.com> Commit-Queue: Duncan Laurie <dlaurie@google.com> Tested-by: Duncan Laurie <dlaurie@google.com>
-rw-r--r--firmware/include/vb2_api.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/firmware/include/vb2_api.h b/firmware/include/vb2_api.h
index e9a1e7b5..4ef64a88 100644
--- a/firmware/include/vb2_api.h
+++ b/firmware/include/vb2_api.h
@@ -7,9 +7,18 @@
*
* DO NOT INCLUDE THE HEADERS BELOW DIRECTLY! ONLY INCLUDE THIS FILE!
*
- * Using vb2_api.h as the single point of contact between calling firmware and
+ * Using vb2api.h as the single point of contact between calling firmware and
* vboot allows subsequent refactoring of vboot (renaming of headers, etc.)
* without churning other projects' source code.
+ */
+
+/*
+ * Switches that can be used in conjunction with this header file:
+ *
+ * #define NEED_VB2_SHA_LIBRARY
+ * SHA library APIs may be called by external firmware as well as vboot.
+ * This is permissible because the SHA library routines below don't interact
+ * with the rest of vboot.
*
* #define NEED_VB20_INTERNALS
* Allows the caller to peek into vboot2 data structures, by including a
@@ -24,6 +33,11 @@
/* Standard APIs */
#include "../2lib/include/2api.h"
+/* SHA library */
+#ifdef NEED_VB2_SHA_LIBRARY
+#include "../2lib/include/2sha.h"
+#endif
+
/*
* Coreboot should not need access to vboot2 internals. But right now it does.
* At least this forces it to do so through a relatively narrow hole so vboot2