diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 655143c106..e5f1b64285 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -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