diff options
author | vnugent <public@vaughnnugent.com> | 2024-05-02 21:54:35 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-05-02 21:54:35 -0400 |
commit | 55fae189fffc86f07a3448370f0a746670819712 (patch) | |
tree | 74c846943fc469590c01aca296a27a5fd0e2ad03 /src/crypto/impl/mbedtls.c | |
parent | 6ff8bb11774c51fd341b7699a3938fd894995fbf (diff) |
feat: Working and tested openssl impl & defaults
Diffstat (limited to 'src/crypto/impl/mbedtls.c')
-rw-r--r-- | src/crypto/impl/mbedtls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/impl/mbedtls.c b/src/crypto/impl/mbedtls.c index 18eb9db..057e7b4 100644 --- a/src/crypto/impl/mbedtls.c +++ b/src/crypto/impl/mbedtls.c @@ -30,7 +30,7 @@ /* Inline errors on linux in header files on linux */ #ifndef inline -#define inline __inline + #define inline __inline #endif #include <mbedtls/md.h> @@ -41,7 +41,7 @@ #include <mbedtls/constant_time.h> #ifndef inline -#undef inline + #undef inline #endif @@ -73,7 +73,7 @@ _IMPLSTB const mbedtls_md_info_t* _mbed_sha256_alg(void) uint32_t dataLen ) { - _sizet_check(dataLen) + _overflow_check(dataLen) /* Counter always starts at 0 */ return mbedtls_chacha20_crypt( @@ -95,7 +95,7 @@ _IMPLSTB const mbedtls_md_info_t* _mbed_sha256_alg(void) _IMPLSTB cstatus_t _mbed_sha256_digest(const cspan_t* data, sha256_t digestOut32) { - _sizet_check(data->size) + _overflow_check(data->size) return mbedtls_sha256( data->data, @@ -114,7 +114,7 @@ _IMPLSTB const mbedtls_md_info_t* _mbed_sha256_alg(void) _IMPLSTB cstatus_t _mbed_sha256_hmac(const cspan_t* key, const cspan_t* data, sha256_t hmacOut32) { - _sizet_check(data->size) + _overflow_check(data->size) /* Keys should never be large enough for this to matter, but sanity check. */ DEBUG_ASSERT2(key->size < SIZE_MAX, "Expected key size to be less than SIZE_MAX") |