mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Introduce single CAMELLIA error code for bad input data
Deprecate the old specific error codes * MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH * MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH
This commit is contained in:
@ -356,7 +356,7 @@ int mbedtls_camellia_setkey_enc( mbedtls_camellia_context *ctx, const unsigned c
|
||||
case 128: ctx->nr = 3; idx = 0; break;
|
||||
case 192:
|
||||
case 256: ctx->nr = 4; idx = 1; break;
|
||||
default : return( MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH );
|
||||
default : return( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
for( i = 0; i < keybits / 8; ++i )
|
||||
@ -562,7 +562,7 @@ int mbedtls_camellia_crypt_cbc( mbedtls_camellia_context *ctx,
|
||||
unsigned char temp[16];
|
||||
|
||||
if( length % 16 )
|
||||
return( MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH );
|
||||
return( MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA );
|
||||
|
||||
if( mode == MBEDTLS_CAMELLIA_DECRYPT )
|
||||
{
|
||||
|
Reference in New Issue
Block a user