Skip to content

Commit 892cd6d

Browse files
committed
psa: Use new generic error codes
Mbed TLS has deprecated a few module specific error codes in favor of more general-purpose or cross-module error codes. Use these new error codes instead of the deprecated error codes.
1 parent 1fe81d4 commit 892cd6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/psa_crypto.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ static psa_status_t mbedtls_to_psa_error( int ret )
172172
case MBEDTLS_ERR_ASN1_BUF_TOO_SMALL:
173173
return( PSA_ERROR_BUFFER_TOO_SMALL );
174174

175-
case MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH:
175+
case MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA:
176176
case MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH:
177177
return( PSA_ERROR_NOT_SUPPORTED );
178178
case MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED:
179179
return( PSA_ERROR_HARDWARE_FAILURE );
180180

181-
case MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH:
181+
case MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA:
182182
case MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH:
183183
return( PSA_ERROR_NOT_SUPPORTED );
184184
case MBEDTLS_ERR_CAMELLIA_HW_ACCEL_FAILED:

0 commit comments

Comments
 (0)