Files
ESP8266_RTOS_SDK/tools/make_cert.py
Espressif Systems 51ac0fe500 NEW VERSION: 1.5.0
1.  add spi flash erase protect mechanism, boot and current runing user
bin can not been erased;
2.  add memleak debug feature;
3.  fix spi overlap issue;
4.  fix call wifi_station_disconnect, disconnect event enter twice
issue;
5.  fix crash when set opmode from station to softAP in scan done
callback;
6.  modify spi flash erase/write flow, clear protect status if needed;
7.  fix rf init data sector broken issue, add user_rf_cal_sector_set,
user application MUST have this function, refer to examples;
8.  fix system parameter sector broken issue when frequently power
on/off;
9.  fix the max value of os_timer_arm;
10. fix dns issue in some routers;
11. add sntp support;
12. update smartconfig to 2.5.4;
13. update open freedom to support send beacon packet;
14. fix seldom rf not work issue after external reset;
15. fix pwm issue;
16. fix status error got by wifi_station_get_connect_status;
17. fix assert in pp;
18. fix huawei X4 connect softAP issue;
19. optimize sleep strategy;
20. add vendor IE support;
21. update libphy.a to 1055;
22. add weak function wifi_set_backup_mac to let user set MAC;
23. fix bug of lwip and optimize socket mechanism;
24. update boot loader to v1.6;
25. update esp_init_data_default.bin
26. add mbedtls support;
27. fix other bugs;
2016-11-09 22:39:56 +08:00

54 lines
1.4 KiB
Python
Executable File

import os
class Cert(object):
def __init__(self, name, buff):
self.name = name
self.len = len(buff)
self.buff = buff
pass
def __str__(self):
out_str = ['\0']*32
for i in range(len(self.name)):
out_str[i] = self.name[i]
out_str = "".join(out_str)
out_str += str(chr(self.len & 0xFF))
out_str += str(chr((self.len & 0xFF00) >> 8))
out_str += self.buff
return out_str
pass
def main():
cert_list = []
file_list = os.listdir(os.getcwd())
cert_file_list = []
for _file in file_list:
pos = _file.find(".key_1024")
if pos != -1:
cert_file_list.append(_file[:pos])
pos = _file.find(".cer")
if pos!= -1:
cert_file_list.append(_file[:pos])
for cert_file in cert_file_list:
if cert_file == 'private_key':
with open(cert_file+".key_1024", 'rb') as f:
buff = f.read()
cert_list.append(Cert(cert_file, buff))
if cert_file == 'certificate':
with open(cert_file+".cer", 'rb') as f:
buff = f.read()
cert_list.append(Cert(cert_file, buff))
with open('esp_cert_private_key.bin', 'wb+') as f:
for _cert in cert_list:
f.write("%s" % _cert)
pass
if __name__ == '__main__':
main()