mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Threading abstraction layer added
This commit is contained in:
@ -145,6 +145,10 @@
|
||||
#include "polarssl/ssl.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_THREADING_C)
|
||||
#include "polarssl/threading.h"
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_X509_USE_C) || defined(POLARSSL_X509_CREATE_C)
|
||||
#include "polarssl/x509.h"
|
||||
#endif
|
||||
@ -647,6 +651,15 @@ void polarssl_strerror( int ret, char *buf, size_t buflen )
|
||||
snprintf( buf, buflen, "SHA512 - Read/write error in file" );
|
||||
#endif /* POLARSSL_SHA512_C */
|
||||
|
||||
#if defined(POLARSSL_THREADING_C)
|
||||
if( use_ret == -(POLARSSL_ERR_THREADING_FEATURE_UNAVAILABLE) )
|
||||
snprintf( buf, buflen, "THREADING - The selected feature is not available" );
|
||||
if( use_ret == -(POLARSSL_ERR_THREADING_BAD_INPUT_DATA) )
|
||||
snprintf( buf, buflen, "THREADING - Bad input parameters to function" );
|
||||
if( use_ret == -(POLARSSL_ERR_THREADING_MUTEX_ERROR) )
|
||||
snprintf( buf, buflen, "THREADING - Locking / unlocking / free failed with error code" );
|
||||
#endif /* POLARSSL_THREADING_C */
|
||||
|
||||
#if defined(POLARSSL_XTEA_C)
|
||||
if( use_ret == -(POLARSSL_ERR_XTEA_INVALID_INPUT_LENGTH) )
|
||||
snprintf( buf, buflen, "XTEA - The data input has an invalid length" );
|
||||
|
Reference in New Issue
Block a user