mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
mbedtls: Fix mbedtls_ssl_send_alert_message crash due to ssl->out_iv is NULL
This commit is contained in:
@@ -41,6 +41,21 @@
|
||||
\
|
||||
})
|
||||
|
||||
typedef enum {
|
||||
ESP_MBEDTLS_SSL_BUF_CACHED,
|
||||
ESP_MBEDTLS_SSL_BUF_NO_CACHED,
|
||||
} esp_mbedtls_ssl_buf_states;
|
||||
|
||||
struct esp_mbedtls_ssl_buf {
|
||||
esp_mbedtls_ssl_buf_states state;
|
||||
unsigned int len;
|
||||
unsigned char buf[];
|
||||
};
|
||||
|
||||
#define SSL_BUF_HEAD_OFFSET_SIZE offsetof(struct esp_mbedtls_ssl_buf, buf)
|
||||
|
||||
void esp_mbedtls_free_buf(unsigned char *buf);
|
||||
|
||||
int esp_mbedtls_setup_tx_buffer(mbedtls_ssl_context *ssl);
|
||||
|
||||
void esp_mbedtls_setup_rx_buffer(mbedtls_ssl_context *ssl);
|
||||
|
Reference in New Issue
Block a user