ESP8266 Developer Zone The Official ESP8266 Forum 2016-08-02T17:27:07+08:00 https://bbs.espressif.com:443/feed.php?f=46&t=2502 2016-08-02T17:27:07+08:00 2016-08-02T17:27:07+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2502&p=8235#p8235 <![CDATA[[重要]ESP8266_NONOS_SDK_V2.0.0使用libssl说明]]>

ESP8266_NONOS_SDK_V2.0.0使用libssl说明:
启用certificate auth需要调用configTime接口启用sntp,否则会由于日期出现证书校验失败,且不支持证书有效期超过2038年12月31日。
/**
* @brief Config the time info of the SNTP server addr.
*
* @param timezone--Settings do not take effect until SNTP time is updated, Allowed values are in the range [-11, 13].
* daylightOffset--Settings do not take effect until SNTP time is updated, Allowed values are in the range [0, 24].
* server1--SNTP Server1.
* server2--SNTP Server2.
* server3--SNTP Server3.
* enable--enable or disable RTC,only support false now.
* @return true or false
*/

bool configTime(int timezone, int daylightOffset, char* server1, char* server2, char* server3, bool enable);

eg:
configTime(8, 0, "cn.ntp.org.cn", "ntp.sjtu.edu.cn", "us.pool.ntp.org", false);



下载 ESP8266_NONOS_SDK_V2.0.0


__________________________________________________________________________________________________________________________


ESP8266_NONOS_SDK_V2.0.0 using libssl:
For ESP8266_NONOS_SDK_V2.0.0 using libssl, the following conditions are needed:
if we are using certificate auth, we need to use the configTime API to provide SNTP, otherwise the certification will expire. We also do not support expire date > 2038.

/**
* @brief Config the time info of the SNTP server addr.
*
* @param timezone--Settings do not take effect until SNTP time is updated, Allowed values are in the range [-11, 13].
* daylightOffset--Settings do not take effect until SNTP time is updated, Allowed values are in the range [0, 24].
* server1--SNTP Server1.
* server2--SNTP Server2.
* server3--SNTP Server3.
* enable--enable or disable RTC,only support false now.
* @return true or false
*/

bool configTime(int timezone, int daylightOffset, char* server1, char* server2, char* server3, bool enable);

eg:
configTime(8, 0, "cn.ntp.org.cn", "ntp.sjtu.edu.cn", "us.pool.ntp.org", false);



Download ESP8266_NONOS_SDK_V2.0.0

Statistics: Posted by ESP_Yuhao — Tue Aug 02, 2016 5:27 pm


]]>