mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-10 10:36:28 +00:00
Add FEATURE_NOT_AVAILABLE error codes.
This commit is contained in:
@@ -668,6 +668,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
#if defined(MBEDTLS_CHACHA20_C)
|
||||
if( use_ret == -(MBEDTLS_ERR_CHACHA20_BAD_INPUT_DATA) )
|
||||
mbedtls_snprintf( buf, buflen, "CHACHA20 - Invalid input parameter(s)" );
|
||||
if( use_ret == -(MBEDTLS_ERR_CHACHA20_FEATURE_UNAVAILABLE) )
|
||||
mbedtls_snprintf( buf, buflen, "CHACHA20 - Feature not available. For example, s part of the API is not implemented" );
|
||||
#endif /* MBEDTLS_CHACHA20_C */
|
||||
|
||||
#if defined(MBEDTLS_CHACHAPOLY_C)
|
||||
@@ -675,6 +677,10 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
mbedtls_snprintf( buf, buflen, "CHACHAPOLY - Invalid input parameter(s)" );
|
||||
if( use_ret == -(MBEDTLS_ERR_CHACHAPOLY_BAD_STATE) )
|
||||
mbedtls_snprintf( buf, buflen, "CHACHAPOLY - The requested operation is not permitted in the current state" );
|
||||
if( use_ret == -(MBEDTLS_ERR_CHACHAPOLY_AUTH_FAILED) )
|
||||
mbedtls_snprintf( buf, buflen, "CHACHAPOLY - Authenticated decryption failed: data was not authentic" );
|
||||
if( use_ret == -(MBEDTLS_ERR_CHACHAPOLY_FEATURE_UNAVAILABLE) )
|
||||
mbedtls_snprintf( buf, buflen, "CHACHAPOLY - Feature not available. For example, s part of the API is not implemented" );
|
||||
#endif /* MBEDTLS_CHACHAPOLY_C */
|
||||
|
||||
#if defined(MBEDTLS_CMAC_C)
|
||||
@@ -792,6 +798,8 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
|
||||
#if defined(MBEDTLS_POLY1305_C)
|
||||
if( use_ret == -(MBEDTLS_ERR_POLY1305_BAD_INPUT_DATA) )
|
||||
mbedtls_snprintf( buf, buflen, "POLY1305 - Invalid input parameter(s)" );
|
||||
if( use_ret == -(MBEDTLS_ERR_POLY1305_FEATURE_UNAVAILABLE) )
|
||||
mbedtls_snprintf( buf, buflen, "POLY1305 - Feature not available. For example, s part of the API is not implemented" );
|
||||
#endif /* MBEDTLS_POLY1305_C */
|
||||
|
||||
#if defined(MBEDTLS_RIPEMD160_C)
|
||||
|
||||
Reference in New Issue
Block a user