mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Use SSL error codes
The `psa_ssl_status_to_mbedtls` function is not only used for cipher operations so transalte to TLS error codes. Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
@ -2132,9 +2132,9 @@ static inline int psa_ssl_status_to_mbedtls( psa_status_t status )
|
|||||||
case PSA_SUCCESS:
|
case PSA_SUCCESS:
|
||||||
return( 0 );
|
return( 0 );
|
||||||
case PSA_ERROR_INSUFFICIENT_MEMORY:
|
case PSA_ERROR_INSUFFICIENT_MEMORY:
|
||||||
return( MBEDTLS_ERR_CIPHER_ALLOC_FAILED );
|
return( MBEDTLS_ERR_SSL_ALLOC_FAILED );
|
||||||
case PSA_ERROR_NOT_SUPPORTED:
|
case PSA_ERROR_NOT_SUPPORTED:
|
||||||
return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE );
|
return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
|
||||||
case PSA_ERROR_INVALID_SIGNATURE:
|
case PSA_ERROR_INVALID_SIGNATURE:
|
||||||
return( MBEDTLS_ERR_SSL_INVALID_MAC );
|
return( MBEDTLS_ERR_SSL_INVALID_MAC );
|
||||||
case PSA_ERROR_INVALID_ARGUMENT:
|
case PSA_ERROR_INVALID_ARGUMENT:
|
||||||
|
Reference in New Issue
Block a user