mqttclient uses mbedtls for tos, and updates the example...

This commit is contained in:
caijie0513
2020-02-21 21:00:24 +08:00
parent 324a1c0620
commit f662bdc680
174 changed files with 3794 additions and 110456 deletions

View File

@@ -13,6 +13,7 @@
#if MQTT_NETWORK_TYPE_TLS
#include "mbedtls/platform.h"
#include "mbedtls/ssl.h"
#include "mbedtls/entropy.h"
#include "mbedtls/net_sockets.h"
@@ -52,6 +53,8 @@ static int platform_nettype_tls_init(network_t* n, nettype_tls_params_t* nettype
{
int rc = MQTT_SUCCESS_ERROR;
mbedtls_platform_set_calloc_free(platform_memory_calloc, platform_memory_free);
mbedtls_net_init(&(nettype_tls_params->socket_fd));
mbedtls_ssl_init(&(nettype_tls_params->ssl));
mbedtls_ssl_config_init(&(nettype_tls_params->ssl_conf));