ussl.wrapsocket and mbedtls
The function arguments for ussl.wrapsocket for ESP32 do not match with the documentation. ussl.wrap_socket(sock, server_side=False, keyfile=None, certfile=None, cert_reqs=CERT_NONE, ca_certs=None)
It seems that the modussl_mbedtls file has a modified function that has parameters listed as "key" and "cert" and missing argument for ca_cert.
Also, in socket_new, the call to mbedtls_ctr_drbg_seed takes null_entropy_func instead of mbedtls_entropy_func.
How to make the ussl.wrapsocket working for ESP32 for use with AWS IoT?
ussl.wrap_socket() acception only socket argument on ESP32 port
As the tile imply, I am trying to use the ussl library on MicroPython v1.16-135-gaecb697c7-dirty on 2021-07-23; ESP32 module with ESP32.
The cause of the version being dirty is me changing the COM address in the Makefile...
Sadly, there is no other possible argument to be given to the function beside the socket, and the documentation and discussion on forums seems to imply otherwise.
What went wrong here?
>>> import ussl
>>> dir(ussl)
['__class__', '__name__', 'wrap_socket']
>>> s = 'dummy'
>>> ussl.wrap_socket(s, certkey='1')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: extra keyword arguments given