[重要]ESP8266_NONOS_SDK_V2.0.0使用libssl说明

ESP_Yuhao
Posts: 14
Joined: Wed Jun 29, 2016 11:30 am

[重要]ESP8266_NONOS_SDK_V2.0.0使用libssl说明

Postby ESP_Yuhao » Tue Aug 02, 2016 5:27 pm

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 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);


Espressif Systems

#204, Block 2, 690 Bibo Road,
Zhang Jiang High-Tech Park, Shanghai, China
www.espressif.com

Who is online

Users browsing this forum: No registered users and 1 guest