Undo deprecation of MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
This commit is contained in:
parent
a034369eca
commit
6640b0d9a3
@ -35,10 +35,8 @@ API Changes
|
||||
in favour of a new generic error MBEDTLS_ERR_ARIA_BAD_INPUT_DATA.
|
||||
* Deprecate the CAMELLIA error MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH
|
||||
in favour a new generic error MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA.
|
||||
* Deprecate the Blowfish error constants
|
||||
- MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH
|
||||
- MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
|
||||
in favour of a new single error MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA.
|
||||
* Deprecate the Blowfish error MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH
|
||||
in favour of a new generic error MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA.
|
||||
|
||||
New deprecations
|
||||
* Deprecate mbedtls_ctr_drbg_update and mbedtls_hmac_drbg_update
|
||||
|
@ -44,10 +44,11 @@
|
||||
|
||||
#if !defined(MBEDTLS_DEPRECATED_REMOVED)
|
||||
#define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0016 )
|
||||
#define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0018 )
|
||||
#endif /* !MBEDTLS_DEPRECATED_REMOVED */
|
||||
#define MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA -0x0016 /**< Bad input data. */
|
||||
|
||||
#define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 /**< Invalid data input length. */
|
||||
|
||||
/* MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED is deprecated and should not be used.
|
||||
*/
|
||||
#define MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED -0x0017 /**< Blowfish hardware accelerator failed. */
|
||||
|
@ -51,7 +51,7 @@
|
||||
* Module Nr Codes assigned
|
||||
* MPI 7 0x0002-0x0010
|
||||
* GCM 3 0x0012-0x0014 0x0013-0x0013
|
||||
* BLOWFISH 2 0x0016-0x0016 0x0017-0x0017
|
||||
* BLOWFISH 3 0x0016-0x0018 0x0017-0x0017
|
||||
* THREADING 3 0x001A-0x001E
|
||||
* AES 5 0x0020-0x0022 0x0021-0x0025
|
||||
* CAMELLIA 3 0x0024-0x0026 0x0027-0x0027
|
||||
|
@ -265,7 +265,7 @@ int mbedtls_blowfish_crypt_cbc( mbedtls_blowfish_context *ctx,
|
||||
unsigned char temp[MBEDTLS_BLOWFISH_BLOCKSIZE];
|
||||
|
||||
if( length % MBEDTLS_BLOWFISH_BLOCKSIZE )
|
||||
return( MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA );
|
||||
return( MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH );
|
||||
|
||||
if( mode == MBEDTLS_BLOWFISH_DECRYPT )
|
||||
{
|
||||
|
@ -674,6 +674,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
#if defined(MBEDTLS_BLOWFISH_C)
|
||||
if( use_ret == -(MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA) )
|
||||
mbedtls_snprintf( buf, buflen, "BLOWFISH - Bad input data" );
|
||||
if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH) )
|
||||
mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid data input length" );
|
||||
if( use_ret == -(MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED) )
|
||||
mbedtls_snprintf( buf, buflen, "BLOWFISH - Blowfish hardware accelerator failed" );
|
||||
#endif /* MBEDTLS_BLOWFISH_C */
|
||||
|
@ -290,10 +290,10 @@ BLOWFISH-CBC Decrypt
|
||||
blowfish_decrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC":"37363534333231204e6f77206973207468652074696d6520666f722000000000":0
|
||||
|
||||
BLOWFISH-CBC Encrypt
|
||||
blowfish_encrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F7220000000":"":MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA
|
||||
blowfish_encrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F7220000000":"":MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
|
||||
|
||||
BLOWFISH-CBC Decrypt
|
||||
blowfish_decrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC00":"":MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA
|
||||
blowfish_decrypt_cbc:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"6B77B4D63006DEE605B156E27403979358DEB9E7154616D959F1652BD5FF92CC00":"":MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH
|
||||
|
||||
BLOWFISH-CFB Encrypt
|
||||
blowfish_encrypt_cfb64:"0123456789ABCDEFF0E1D2C3B4A59687":"FEDCBA9876543210":"37363534333231204E6F77206973207468652074696D6520666F722000":"e73214a2822139caf26ecf6d2eb9e76e3da3de04d1517200519d57a6c3"
|
||||
|
Loading…
Reference in New Issue
Block a user