mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Refactor and change CMAC interface
Change the CMAC interface to match the mbedtls_md_hmac_xxxx() interface. This changes the overall design of the CMAC interface to make it more consistent with the existing HMAC interface, and will allow incremental updates of input data rather than requiring all data to be presented at once, which is what the current interface requires.
This commit is contained in:
@ -582,15 +582,6 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
mbedtls_snprintf( buf, buflen, "CCM - Authenticated decryption failed" );
|
||||
#endif /* MBEDTLS_CCM_C */
|
||||
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
if( use_ret == -(MBEDTLS_ERR_CMAC_BAD_INPUT) )
|
||||
mbedtls_snprintf( buf, buflen, "CMAC - Bad input parameters to function" );
|
||||
if( use_ret == -(MBEDTLS_ERR_CMAC_VERIFY_FAILED) )
|
||||
mbedtls_snprintf( buf, buflen, "CMAC - Verification failed" );
|
||||
if( use_ret == -(MBEDTLS_ERR_CMAC_ALLOC_FAILED) )
|
||||
mbedtls_snprintf( buf, buflen, "CMAC - Failed to allocate memory" );
|
||||
#endif /* MBEDTLS_CMAC_C */
|
||||
|
||||
#if defined(MBEDTLS_CTR_DRBG_C)
|
||||
if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED) )
|
||||
mbedtls_snprintf( buf, buflen, "CTR_DRBG - The entropy source failed" );
|
||||
|
Reference in New Issue
Block a user