diff options
author | Joel Kitching <kitching@google.com> | 2019-04-25 18:00:42 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-17 18:36:47 -0700 |
commit | de30df731edc7ed2729982de588e0f8b9082cf3c (patch) | |
tree | 3c17c780a5310d171ba1b2a09e225ea90c1370db | |
parent | 8a4f0bef0ec665a24ca3a01b2ee6915e2e392a18 (diff) | |
download | vboot-de30df731edc7ed2729982de588e0f8b9082cf3c.tar.gz |
vboot: de-externalize vb2_digest_buffer function
Clients which wish to use this function may simply import the
vb2_sha.h header to make all SHA library functionality available.
Whether or not to make a full vb2api_ set of functions for SHA
library should be considered in the future, but individual
functions should not be added to the API as was done.
BUG=b:124141368, chromium:956474
TEST=make clean && make runtests
BRANCH=none
Change-Id: I1dc8ed84ecfb621a57411975f312e96a695b68f4
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:1583942
Reviewed-on: https://chromium-review.googlesource.com/1583822
Commit-Ready: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | firmware/2lib/2api.c | 9 | ||||
-rw-r--r-- | firmware/2lib/include/2api.h | 16 |
2 files changed, 0 insertions, 25 deletions
diff --git a/firmware/2lib/2api.c b/firmware/2lib/2api.c index ada229a5..f10a1e69 100644 --- a/firmware/2lib/2api.c +++ b/firmware/2lib/2api.c @@ -223,12 +223,3 @@ int vb2api_get_pcr_digest(struct vb2_context *ctx, return VB2_SUCCESS; } - -int vb2api_digest_buffer(const uint8_t *buf, - uint32_t size, - enum vb2_hash_algorithm hash_alg, - uint8_t *digest, - uint32_t digest_size) -{ - return vb2_digest_buffer(buf, size, hash_alg, digest, digest_size); -} diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index eed7e126..e7964e28 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -712,22 +712,6 @@ int vb2ex_hwcrypto_digest_extend(const uint8_t *buf, uint32_t size); */ int vb2ex_hwcrypto_digest_finalize(uint8_t *digest, uint32_t digest_size); -/** - * Calculate the digest of a buffer and store the result. - * - * @param buf Data to hash - * @param size Length of data in bytes - * @param hash_alg Hash algorithm - * @param digest Destination for digest - * @param digest_size Length of digest buffer in bytes. - * @return VB2_SUCCESS, or non-zero on error. - */ -int vb2api_digest_buffer(const uint8_t *buf, - uint32_t size, - enum vb2_hash_algorithm hash_alg, - uint8_t *digest, - uint32_t digest_size); - /* * Set the current TPM mode value, and validate that it was changed. If one * of the following occurs, the function call fails: |