Page 1 of 1

How to connect to an ssl server using the sntp protocol on ESP8266?

Posted: Sat Jan 16, 2021 9:28 pm
by Wootenhuber361
I use an ESP8266 with a C-language esp-open-sdk.
In order to get the timestamp, I have tried to use this code, but it always fails – I only get 0:
the timezone(2);
Name(0, 'fr.pool.ntp.org') of sntp- setserver();
sntp datum();
timer = sntp get time timetranscription();
os printf("time : percent d and percent s\n"timestyle, sntp get real time(timestyle));
I try to connect to a Server to make a https request, as you might have understand, (I'm using the functions espconn secure_***) but it's not working every time.
It may be due to the time (the certificate cannot be genuine.

Post BY: Assignment Help

Re: How to connect to an ssl server using the sntp protocol on ESP8266?

Posted: Tue Jan 19, 2021 10:16 am
by Her Mary

Re: How to connect to an ssl server using the sntp protocol on ESP8266?

Posted: Fri Feb 12, 2021 2:30 pm
by ChrisGreenwalty
You need to mlaunch openssl then you need to enter the following command

Code: Select all

genrsa -out key.txt 1024
rsa -in key.txt -out key.txt
req -sha256 -new -nodes -key key.txt -out cert.csr -subj '/C=RO/ST=B/L=Bucharest/O=OneTransistor [RO]/OU=OneTransistor/CN=esp8266.local' -addext subjectAltName=DNS:esp8266.local
x509 -req -sha256 -days 365 -in cert.csr -signkey key.txt -out cert.txt


I hope that this will resolve your problem.

By: assignment help