mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-07-02 06:38:00 +08:00
update make_cert.py
This commit is contained in:
@ -23,7 +23,7 @@ Clone ESP8266_RTOS_SDK, e.g., to ~/ESP8266_RTOS_SDK.
|
|||||||
$git clone https://github.com/espressif/ESP8266_RTOS_SDK.git
|
$git clone https://github.com/espressif/ESP8266_RTOS_SDK.git
|
||||||
|
|
||||||
Modify gen_misc.sh or gen_misc.bat:
|
Modify gen_misc.sh or gen_misc.bat:
|
||||||
For Linux<EFBFBD><EFBFBD>
|
For Linux:
|
||||||
|
|
||||||
$export SDK_PATH=~/ESP8266_RTOS_SDK
|
$export SDK_PATH=~/ESP8266_RTOS_SDK
|
||||||
$export BIN_PATH=~/ESP8266_BIN
|
$export BIN_PATH=~/ESP8266_BIN
|
||||||
|
@ -25,12 +25,11 @@ def main():
|
|||||||
file_list = os.listdir(os.getcwd())
|
file_list = os.listdir(os.getcwd())
|
||||||
cert_file_list = []
|
cert_file_list = []
|
||||||
for _file in file_list:
|
for _file in file_list:
|
||||||
pos = _file.find(".cer")
|
if _file.endswith(".cer") or _file.endswith(".key"):
|
||||||
if pos != -1:
|
cert_file_list.append(_file)
|
||||||
cert_file_list.append(_file[:pos])
|
print cert_file_list
|
||||||
|
|
||||||
for cert_file in cert_file_list:
|
for cert_file in cert_file_list:
|
||||||
with open(cert_file+".cer", 'rb') as f:
|
with open(cert_file, 'rb') as f:
|
||||||
buff = f.read()
|
buff = f.read()
|
||||||
cert_list.append(Cert(cert_file, buff))
|
cert_list.append(Cert(cert_file, buff))
|
||||||
with open('esp_ca_cert.bin', 'wb+') as f:
|
with open('esp_ca_cert.bin', 'wb+') as f:
|
||||||
|
Reference in New Issue
Block a user