mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
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:
@@ -69,19 +69,19 @@ uint8_t* SHA512_final(SHA512_CTX* ctx);
|
||||
* and stores it into [digest]. [digest] should be pre-allocated to
|
||||
* SHA1_DIGEST_SIZE bytes.
|
||||
*/
|
||||
uint8_t* SHA1(const uint8_t* data, uint64_t len, uint8_t* digest);
|
||||
uint8_t* internal_SHA1(const uint8_t* data, uint64_t len, uint8_t* digest);
|
||||
|
||||
/* Convenience function for SHA-256. Computes hash on [data] of length [len].
|
||||
* and stores it into [digest]. [digest] should be pre-allocated to
|
||||
* SHA256_DIGEST_SIZE bytes.
|
||||
*/
|
||||
uint8_t* SHA256(const uint8_t* data, uint64_t len, uint8_t* digest);
|
||||
uint8_t* internal_SHA256(const uint8_t* data, uint64_t len, uint8_t* digest);
|
||||
|
||||
/* Convenience function for SHA-512. Computes hash on [data] of length [len].
|
||||
* and stores it into [digest]. [digest] should be pre-allocated to
|
||||
* SHA512_DIGEST_SIZE bytes.
|
||||
*/
|
||||
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);
|
||||
|
||||
|
||||
/*---- Utility functions/wrappers for message digests. */
|
||||
|
||||
Reference in New Issue
Block a user