- Added regular error codes for generic message digest layer

This commit is contained in:
Paul Bakker 2011-06-09 15:55:11 +00:00
parent c65ab340a7
commit 9c021adeff
3 changed files with 60 additions and 28 deletions

View file

@ -137,6 +137,14 @@ void error_strerror( int ret, char *buf, size_t buflen )
#if defined(POLARSSL_MD_C)
if( use_ret == -(POLARSSL_ERR_MD_FEATURE_UNAVAILABLE) )
snprintf( buf, buflen, "MD - The selected feature is not available" );
if( use_ret == -(POLARSSL_ERR_MD_BAD_INPUT_DATA) )
snprintf( buf, buflen, "MD - Bad input parameters to function" );
if( use_ret == -(POLARSSL_ERR_MD_ALLOC_FAILED) )
snprintf( buf, buflen, "MD - Failed to allocate memory" );
if( use_ret == -(POLARSSL_ERR_MD_FILE_OPEN_FAILED) )
snprintf( buf, buflen, "MD - Opening of file failed" );
if( use_ret == -(POLARSSL_ERR_MD_FILE_READ_FAILED) )
snprintf( buf, buflen, "MD - Failure when reading from file" );
#endif /* POLARSSL_MD_C */
#if defined(POLARSSL_PEM_C)