1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Add function for set pending alert flag

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu
2021-09-14 22:17:21 +08:00
parent 33cedca8aa
commit 394ece6cdd
3 changed files with 29 additions and 16 deletions

View File

@ -1527,10 +1527,7 @@ struct mbedtls_ssl_context
on next call to record layer? */
/* The following three variables indicate if and, if yes,
* what kind of alert or warning is pending to be sent.
* They should not be set manually but through the macro
* MBEDTLS_SSL_PEND_FATAL_ALERT( type, user_return_value )
* defined below.
* what kind of alert is pending to be sent.
*/
unsigned char MBEDTLS_PRIVATE(send_alert); /*!< Determines if a fatal alert
should be sent. Values:
@ -1640,14 +1637,6 @@ struct mbedtls_ssl_context
#endif
};
#define MBEDTLS_SSL_PEND_FATAL_ALERT( type, user_return_value ) \
do \
{ \
ssl->send_alert = 1; \
ssl->alert_reason = (user_return_value); \
ssl->alert_type = (type); \
} while( 0 )
/**
* \brief Return the name of the ciphersuite associated with the
* given ID