I'm using the latest release version of micropython (1.12), am trying to write an ssl client and can't seem to get ssl to even start. I've done this on other builds of micropython (ie. pycom, and yes I know there are differences), but am having trouble using generic micropython on a generic esp32 wroom 32 dev board:
Code: Select all
MicroPython v1.12 on 2019-12-20; ESP32 module with ESP32
Type "help()" for more information.
>>> import network
>>> wlan = network.WLAN()
>>> wlan.isconnected()
True
>>> import socket
>>> import ussl
>>> s = socket.socket()
>>> ss = ussl.wrap_socket(s)
mbedtls_ssl_handshake error: -80
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 5] EIO
>>>
Any idea what I'm doing wrong? There are no other args to wrap_socket() that I can seem to use on the esp32; it looks like it doesn't support any kind of certificate validation. I get this with all the keyword args I try:
Code: Select all
>>> ussl.wrap_socket(s, ca_certs='something')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: extra keyword arguments given
Note that I can get a non-ssl socket connection to work fine so the network connection is good.
Thanks.