mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-29 21:27:02 +08:00
Merge branch 'feature/modify_esp_tls_structure_v3.3' into 'release/v3.3'
esp-tls: modify esp-tls structure members' offset of platform dependece (backport v3.3) See merge request sdk/ESP8266_RTOS_SDK!1220
This commit is contained in:
@ -249,6 +249,28 @@ typedef struct esp_tls_cfg_server {
|
|||||||
* @brief ESP-TLS Connection Handle
|
* @brief ESP-TLS Connection Handle
|
||||||
*/
|
*/
|
||||||
typedef struct esp_tls {
|
typedef struct esp_tls {
|
||||||
|
int sockfd; /*!< Underlying socket file descriptor. */
|
||||||
|
|
||||||
|
ssize_t (*_read)(struct esp_tls *tls, char *data, size_t datalen); /*!< Callback function for reading data from TLS/SSL
|
||||||
|
connection. */
|
||||||
|
|
||||||
|
ssize_t (*_write)(struct esp_tls *tls, const char *data, size_t datalen); /*!< Callback function for writing data to TLS/SSL
|
||||||
|
connection. */
|
||||||
|
|
||||||
|
esp_tls_conn_state_t conn_state; /*!< ESP-TLS Connection state */
|
||||||
|
|
||||||
|
fd_set rset; /*!< read file descriptors */
|
||||||
|
|
||||||
|
fd_set wset; /*!< write file descriptors */
|
||||||
|
|
||||||
|
bool is_tls; /*!< indicates connection type (TLS or NON-TLS) */
|
||||||
|
|
||||||
|
esp_tls_role_t role; /*!< esp-tls role
|
||||||
|
- ESP_TLS_CLIENT
|
||||||
|
- ESP_TLS_SERVER */
|
||||||
|
|
||||||
|
esp_tls_error_handle_t error_handle; /*!< handle to error descriptor */
|
||||||
|
|
||||||
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS
|
#ifdef CONFIG_ESP_TLS_USING_MBEDTLS
|
||||||
mbedtls_ssl_context ssl; /*!< TLS/SSL context */
|
mbedtls_ssl_context ssl; /*!< TLS/SSL context */
|
||||||
|
|
||||||
@ -282,28 +304,6 @@ typedef struct esp_tls {
|
|||||||
void *priv_ctx;
|
void *priv_ctx;
|
||||||
void *priv_ssl;
|
void *priv_ssl;
|
||||||
#endif
|
#endif
|
||||||
int sockfd; /*!< Underlying socket file descriptor. */
|
|
||||||
|
|
||||||
ssize_t (*_read)(struct esp_tls *tls, char *data, size_t datalen); /*!< Callback function for reading data from TLS/SSL
|
|
||||||
connection. */
|
|
||||||
|
|
||||||
ssize_t (*_write)(struct esp_tls *tls, const char *data, size_t datalen); /*!< Callback function for writing data to TLS/SSL
|
|
||||||
connection. */
|
|
||||||
|
|
||||||
esp_tls_conn_state_t conn_state; /*!< ESP-TLS Connection state */
|
|
||||||
|
|
||||||
fd_set rset; /*!< read file descriptors */
|
|
||||||
|
|
||||||
fd_set wset; /*!< write file descriptors */
|
|
||||||
|
|
||||||
bool is_tls; /*!< indicates connection type (TLS or NON-TLS) */
|
|
||||||
|
|
||||||
esp_tls_role_t role; /*!< esp-tls role
|
|
||||||
- ESP_TLS_CLIENT
|
|
||||||
- ESP_TLS_SERVER */
|
|
||||||
|
|
||||||
esp_tls_error_handle_t error_handle; /*!< handle to error descriptor */
|
|
||||||
|
|
||||||
} esp_tls_t;
|
} esp_tls_t;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user