Apply suggestions from code review

Co-authored-by: Ronald Cron <ronald.cron@arm.com>
Signed-off-by: ng-gsmk <ng@gsmk.de>
This commit is contained in:
ng-gsmk
2026-01-26 13:07:26 +01:00
committed by GitHub
parent 6140cfb438
commit 15c68993cb

View File

@@ -1715,11 +1715,11 @@ struct mbedtls_ssl_context {
int MBEDTLS_PRIVATE(keep_current_message); /*!< drop or reuse current message
on next call to record layer? */
unsigned char MBEDTLS_PRIVATE(in_alert_recv); /*!< Determines if a fatal alert has
unsigned char MBEDTLS_PRIVATE(in_fatal_alert_recv); /*!< Determines if a fatal alert has
been received. Values:
- \c 0 , no fatal alert received.
- \c 1 , a fatal alert has been received */
unsigned char MBEDTLS_PRIVATE(in_alert_type); /*!< Type of fatal alert if in_alert_recv
unsigned char MBEDTLS_PRIVATE(in_fatal_alert_type); /*!< Type of fatal alert if in_alert_recv
!= 0 */
/* The following three variables indicate if and, if yes,
@@ -4920,19 +4920,19 @@ int mbedtls_ssl_send_alert_message(mbedtls_ssl_context *ssl,
unsigned char message);
/**
* \brief Get the received fatal alert
* \brief Get the last received fatal alert
*
* \param ssl SSL context
*
* \return The alert description type (MBEDTLS_SSL_ALERT_MSG_*) if a fatal
* alert has been received or MBEDTLS_ERR_SSL_BAD_INPUT_DATA
* alert has been received, MBEDTLS_ERR_SSL_BAD_INPUT_DATA otherwise.
*
* \note This function can be used in case mbedtls_ssl_handshake(),
* mbedtls_ssl_handshake_step() or mbedtls_ssl_read() returned
* MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE to get the actual alert
* description type.
*/
int mbedtls_ssl_get_alert(mbedtls_ssl_context *ssl);
int mbedtls_ssl_get_fatal_alert(const mbedtls_ssl_context *ssl);
/**
* \brief Notify the peer that the connection is being closed