summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2016-05-05 17:21:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-05-10 19:41:46 -0700
commitf3f9e00ef037695c4e792948effa1253f680c118 (patch)
treecb60549b87c41f99138ec69b7a9a403b048c612c /Makefile
parent5319565988fc5b1862d649fad985859929946a91 (diff)
downloadvboot-f3f9e00ef037695c4e792948effa1253f680c118.tar.gz
hmac: Add HMAC to 2lib library
This patch adds HMAC. HMAC will be used to sign/verify NVM structures. Hash algorithms can be selected from those supported by enum vb2_hash_algorithm (i.e. SHA1, SHA256, or SHA512). BUG=chrome-os-partner:51907 BRANCH=tot TEST=make runtests Change-Id: I6d349bc807874fe2a5512aabcd7fbf67a4eaa40a Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/342880 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 900214fc..8989147f 100644
--- a/Makefile
+++ b/Makefile
@@ -356,7 +356,8 @@ FWLIB2X_SRCS = \
firmware/2lib/2sha256.c \
firmware/2lib/2sha512.c \
firmware/2lib/2sha_utility.c \
- firmware/2lib/2tpm_bootmode.c
+ firmware/2lib/2tpm_bootmode.c \
+ firmware/2lib/2hmac.c
FWLIB20_SRCS = \
firmware/lib20/api.c \
@@ -757,7 +758,8 @@ TEST2X_NAMES = \
tests/vb2_rsa_utility_tests \
tests/vb2_secdata_tests \
tests/vb2_secdatak_tests \
- tests/vb2_sha_tests
+ tests/vb2_sha_tests \
+ tests/hmac_test
TEST20_NAMES = \
tests/vb20_api_tests \
@@ -1263,6 +1265,7 @@ ${BUILD}/tests/vb20_common3_tests: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/tests/verify_kernel: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/tests/bdb_test: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/tests/bdb_sprw_test: LDLIBS += ${CRYPTO_LIBS}
+${BUILD}/tests/hmac_test: LDLIBS += ${CRYPTO_LIBS}
${TEST21_BINS}: LDLIBS += ${CRYPTO_LIBS}
@@ -1464,6 +1467,7 @@ run2tests: test_setup
${RUNTEST} ${BUILD_RUN}/tests/vb21_host_keyblock_tests ${TEST_KEYS}
${RUNTEST} ${BUILD_RUN}/tests/vb21_host_misc_tests ${BUILD}
${RUNTEST} ${BUILD_RUN}/tests/vb21_host_sig_tests ${TEST_KEYS}
+ ${RUNTEST} ${BUILD_RUN}/tests/hmac_test
.PHONY: runbdbtests
runbdbtests: test_setup