pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
198 stars 167 forks source link

Add allow_renegotiation to ssl.wrap_socket() #534

Open martijns opened 3 years ago

martijns commented 3 years ago

In order to authenticate and communicate using client-certificate authentication with Azure Web Apps, TLS session renegotiation must be enabled. When failing to do so, reading from the socket after sending the initial HTTP request will fail with OSError: [Errno -80] MBEDTLS_ERR_NET_CONN_RESET.

This pull request adds a parameter to ssl.wrap_socket() called allow_renegotiation. This is disabled by default as per current implementation, but can be enabled by setting it to True.

Lacking official documentation on the inner workings, some speculation on what might be happening:

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.