mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 03:55:44 +01:00
Remove field to store level of pending alert
Pending alerts is so far only used for fatal alerts.
This commit is contained in:
parent
de62da9d3c
commit
3caf7189f9
@ -1235,7 +1235,6 @@ struct mbedtls_ssl_context
|
||||
{
|
||||
const mbedtls_ssl_config *conf; /*!< configuration information */
|
||||
|
||||
unsigned char pend_alert_level;
|
||||
unsigned char pend_alert_msg;
|
||||
|
||||
/*
|
||||
|
@ -1734,8 +1734,6 @@ MBEDTLS_ALWAYS_INLINE static inline int mbedtls_ssl_pend_fatal_alert(
|
||||
mbedtls_ssl_context *ssl,
|
||||
unsigned char message )
|
||||
{
|
||||
/* ssl->pend_alert_level is fatal by default,
|
||||
* so we don't need set it here. */
|
||||
ssl->pend_alert_msg = message;
|
||||
return( 0 );
|
||||
}
|
||||
|
@ -7975,7 +7975,6 @@ int mbedtls_ssl_setup( mbedtls_ssl_context *ssl,
|
||||
goto error;
|
||||
|
||||
ssl->pend_alert_msg = MBEDTLS_SSL_ALERT_MSG_NONE;
|
||||
ssl->pend_alert_level = MBEDTLS_SSL_ALERT_LEVEL_FATAL;
|
||||
|
||||
return( 0 );
|
||||
|
||||
@ -9832,10 +9831,9 @@ int mbedtls_ssl_handshake_step( mbedtls_ssl_context *ssl )
|
||||
if( ssl->pend_alert_msg != MBEDTLS_SSL_ALERT_MSG_NONE )
|
||||
{
|
||||
mbedtls_ssl_send_alert_message( ssl,
|
||||
ssl->pend_alert_level,
|
||||
MBEDTLS_SSL_ALERT_LEVEL_FATAL,
|
||||
ssl->pend_alert_msg );
|
||||
ssl->pend_alert_msg = MBEDTLS_SSL_ALERT_MSG_NONE;
|
||||
ssl->pend_alert_level = MBEDTLS_SSL_ALERT_LEVEL_FATAL;
|
||||
}
|
||||
return( ret );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user