feat(exmaples): remove wolfSSL example

The wolfSSL example will be supplied independently.
This commit is contained in:
dongheng
2019-10-10 13:53:24 +08:00
parent 5f2b5eafcf
commit 1f8192d9f9
29 changed files with 1 additions and 770 deletions

View File

@ -38,10 +38,6 @@
#include "lwip/netdb.h"
#include "lwip/dns.h"
#if CONFIG_SSL_USING_WOLFSSL
#include "lwip/apps/sntp.h"
#endif
#include "esp_tls.h"
/* The examples use simple WiFi configuration that you can set via
@ -133,50 +129,11 @@ static void initialise_wifi(void)
ESP_ERROR_CHECK( esp_wifi_start() );
}
#if CONFIG_SSL_USING_WOLFSSL
static void get_time()
{
struct timeval now;
int sntp_retry_cnt = 0;
int sntp_retry_time = 0;
sntp_setoperatingmode(0);
sntp_setservername(0, "pool.ntp.org");
sntp_init();
while (1) {
for (int32_t i = 0; (i < (SNTP_RECV_TIMEOUT / 100)) && now.tv_sec < 1525952900; i++) {
vTaskDelay(100 / portTICK_RATE_MS);
gettimeofday(&now, NULL);
}
if (now.tv_sec < 1525952900) {
sntp_retry_time = SNTP_RECV_TIMEOUT << sntp_retry_cnt;
if (SNTP_RECV_TIMEOUT << (sntp_retry_cnt + 1) < SNTP_RETRY_TIMEOUT_MAX) {
sntp_retry_cnt ++;
}
printf("SNTP get time failed, retry after %d ms\n", sntp_retry_time);
vTaskDelay(sntp_retry_time / portTICK_RATE_MS);
} else {
printf("SNTP get time success\n");
break;
}
}
}
#endif
static void https_get_task(void *pvParameters)
{
char buf[512];
int ret, len;
#if CONFIG_SSL_USING_WOLFSSL
/* CA date verification need system time */
get_time();
#endif
while(1) {
/* Wait for the callback to set the CONNECTED_BIT in the
event group.

View File

@ -1,2 +1 @@
CONFIG_SSL_USING_MBEDTLS=y
CONFIG_LWIP_IPV6=y