How to take the file 'ca.pem' to ‘/flash/cert/’?
-
when i use ssl module, how can i take the file 'ca.pem' to '/flash/cert/' ?
-
@DongYin said in How to take the file 'ca.pem' to ‘/flash/cert/’?:
By the way ,how to add my code with black backcolor?
look here http://commonmark.org/help/
-
@livius
only socket is OK.
s = socket.socket()
s.connect(socket.getaddrinfo('192.168.119.38', 43414)[0][-1])By the way ,how to add my code with black backcolor?
-
@livius
This is my ssl code.and WiFi is connect.
s = socket.socket()
#s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
ss = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED, ca_certs='/flash/cert/client.pem')
ss.connect(socket.getaddrinfo('192.168.119.38', 43416)[0][-1])
-
@DongYin
could you show some sample code?
it is something near this?
https://docs.pycom.io/pycom_esp32/library/ussl.htmlimport socket import ssl s = socket.socket() ss = ssl.wrap_socket(s, cert_reqs=ssl.CERT_REQUIRED, ca_certs='/flash/cert/ca.pem') ss.connect(socket.getaddrinfo('cloud.blynk.cc', 8441)[0][-1])
-
-
@DongYin said in How to take the file 'ca.pem' to ‘/flash/cert/’?:
ssl
No, i did not used it. But you can see on the forum that few person use it succesfully.
What version of firmware do you have?os.uname()
-
@livius
Is the ssl module OK? did you use it successful?
there aways output an OSError:-9984
-
@livius
Thank you! It works now.
-
@DongYin
look here - go to Filezilla section
https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html?highlight=filezilla
-
@livius
I used 'freshftp' before, i can see the flash directory by this tool, but can't write file to flash.
then i used 'Filezilla', an error come out :"GnuTLS error -15: An unexpected TLS packet was received"
is there any settings required?
-
@DongYin
Which tool do you use for ftp? And do you got some error when you put file?
In current firmware i have some problems with ftp stability
but i can put file by e.g. Filezilla
-
@livius Thanks for your explain, as your method i can view '/flash/' ,but can't write file to it.
-
@DongYin
connect to it by ftp (wifi) and put file there
default ip is 192.168.4.1 user micro password python