I've now successfully implemented non-blocking TCP sockets and also added SSL/TLS encryption using openssl that ships with ESP-IDF. All communication is handled by a single task and incoming and outgoing data are distributed via queues to other tasks. I'm using the latest version of the master branch directly from git.
This is working really well, but I've noticed that a call to SSL_connect() can block for quite a long time, which defeats the purpose of non-blocking sockets since all communication on all sockets stops during the call since it is all handled by a single task.
I therefor intended to use an alternative implementation using BIO's, as demonstrated here. Unfortunately the openssl implementation that ships with ESP-IDF seems incomplete because I'm getting linker errors for methods such as these:
Code: Select all
undefined reference to `SSL_get_rbio'
undefined reference to `SSL_get_wbio'