cryptolib: rename SHA* function to avoid openssl collision

When linking tools that need OpenSSL functions on the target, the
resolution of SHA* functions was being redirected to the firmware
cryptolib instead of the OpenSSL implementations, which was causing
OpenSSL calls to crash. This renames the internal implementations
to avoid the collision.

BUG=None
TEST=make runtests passes, mount-encrypted runs on target again.

Change-Id: Ica4fb04faf203ae3b4118c540f18d40239753810
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23305
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Kees Cook
2012-05-22 18:05:53 -07:00
committed by Gerrit
parent b75d8adcc0
commit 201fe0bb55
7 changed files with 25 additions and 25 deletions

View File

@@ -336,7 +336,7 @@ uint8_t* SHA512_final(SHA512_CTX* ctx)
}
uint8_t* SHA512(const uint8_t* data, uint64_t len, uint8_t* digest) {
uint8_t* internal_SHA512(const uint8_t* data, uint64_t len, uint8_t* digest) {
const uint8_t* input_ptr;
const uint8_t* result;
uint64_t remaining_len;