- Added handling for CTR_DRBG module
This commit is contained in:
parent
0e04d0e9a3
commit
880ac7eb95
2 changed files with 15 additions and 1 deletions
|
@ -47,6 +47,10 @@
|
|||
#include "polarssl/cipher.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_CTR_DRBG_C)
|
||||
#include "polarssl/ctr_drbg.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_DES_C)
|
||||
#include "polarssl/des.h"
|
||||
#endif
|
||||
|
@ -373,6 +377,15 @@ void error_strerror( int ret, char *buf, size_t buflen )
|
|||
snprintf( buf, buflen, "CAMELLIA - Invalid data input length" );
|
||||
#endif /* POLARSSL_CAMELLIA_C */
|
||||
|
||||
#if defined(POLARSSL_CTR_DRBG_C)
|
||||
if( use_ret == -(POLARSSL_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED) )
|
||||
snprintf( buf, buflen, "CTR_DRBG - The entropy source failed" );
|
||||
if( use_ret == -(POLARSSL_ERR_CTR_DRBG_REQUEST_TOO_BIG) )
|
||||
snprintf( buf, buflen, "CTR_DRBG - Too many random requested in single call" );
|
||||
if( use_ret == -(POLARSSL_ERR_CTR_DRBG_INPUT_TOO_BIG) )
|
||||
snprintf( buf, buflen, "CTR_DRBG - Input too large (Entropy + additional)" );
|
||||
#endif /* POLARSSL_CTR_DRBG_C */
|
||||
|
||||
#if defined(POLARSSL_DES_C)
|
||||
if( use_ret == -(POLARSSL_ERR_DES_INVALID_INPUT_LENGTH) )
|
||||
snprintf( buf, buflen, "DES - The data input has an invalid length" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue