微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI WIFI设计交流 > CC3200 httpclient ssl问题 SL_SSL_CA_CERT

CC3200 httpclient ssl问题 SL_SSL_CA_CERT

时间:10-02 整理:3721RD 点击:

ti工程师你们好,在CC3200 httpclient demo中要启用安全性连接需要插入下面的一段程序,SL_SSL_CA_CERT没有被定义,SL_SSL_CA_CERT应该是安全验证证书,我想问一下,SL_SSL_CA_CERT是可以随意定义的呢,还是要购买申请,谢谢!

SlDateTime_t dt;
struct HTTPCli_SecureParams sparams;
/* Set current Date to validate certificate */
dt.sl_tm_day = DATE;
dt.sl_tm_mon = MONTH;
dt.sl_tm_year = YEAR;
dt.sl_tm_hour = HOUR;
dt.sl_tm_min = MINUTE;
dt.sl_tm_sec = SECOND;
sl_DevSet(SL_DEVICE_GENERAL_CONFIGURATION,
SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME,
sizeof(SlDateTime_t), (unsigned char *)(&dt));
/* Security parameters */
sparams.method.secureMethod = SL_SO_SEC_METHOD_TLSV1_2;
sparams.mask.secureMask = SL_SEC_MASK_TLS_RSA_WITH_AES_256_CBC_SHA;
strncpy(sparams.cafile, SL_SSL_CA_CERT, sizeof(SL_SSL_CA_CERT));
sparams.privkey[0] = 0;
sparams.cert[0] = 0;
sparams.dhkey[0] = 0;
HTTPCli_setSecureParams(&sparams);

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top