mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
- A error_strerror function() has been added to translate between error codes and their description.
- The error codes have been remapped and combining error codes is now done with a PLUS instead of an OR as error codes used are negative. - Descriptions to all error codes have been added. - Generation script for error.c has been created to automatically generate error.c from the available error definitions in the headers.
This commit is contained in:
@ -1159,7 +1159,11 @@ int ssl_read_record( ssl_context *ssl )
|
||||
if( ssl->in_msg[0] == SSL_ALERT_LEVEL_FATAL )
|
||||
{
|
||||
SSL_DEBUG_MSG( 1, ( "is a fatal alert message" ) );
|
||||
return( POLARSSL_ERR_SSL_FATAL_ALERT_MESSAGE | ssl->in_msg[1] );
|
||||
/**
|
||||
* Subtract from error code as ssl->in_msg[1] is 7-bit positive
|
||||
* error identifier.
|
||||
*/
|
||||
return( POLARSSL_ERR_SSL_FATAL_ALERT_MESSAGE - ssl->in_msg[1] );
|
||||
}
|
||||
|
||||
if( ssl->in_msg[0] == SSL_ALERT_LEVEL_WARNING &&
|
||||
|
Reference in New Issue
Block a user