Extend PSA error translation

Add new error codes to the PSA to mbedtls error translation.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
Gabor Mezei 2022-03-21 12:17:49 +01:00
parent 58db65354b
commit adfeadc6e5
No known key found for this signature in database
GPG Key ID: 106F5A41ECC305BD

View File

@ -2137,6 +2137,10 @@ static inline int psa_ssl_status_to_mbedtls( psa_status_t status )
return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE );
case PSA_ERROR_INVALID_SIGNATURE:
return( MBEDTLS_ERR_SSL_INVALID_MAC );
case PSA_ERROR_INVALID_ARGUMENT:
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
case PSA_ERROR_BAD_STATE:
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
default:
return( MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
}