PolarSSL is now part of ARM Official announcement and rebranded as mbed TLS.

select() with mbedtls


Nov 17, 2017 04:47
Fan

Dear friends,

Can somebody point me to an example of using select() or libevent with mbedtls? My basic question is: if one or more client sockets have data to be read, which API should I use to read them correctly, i.e. with the correct mbedtls_ssl_context? Does this happen automatically or I have to maintain a mapping from socket to ssl_contecxt myself?

 
Nov 19, 2017 10:01
Ron Eldor

Hi Fan,
Mbed TLS doesn't have its own proprietary select() and you will need to implement it in your project.
You will need to have your own mapping of mbedtls_ssl_context per socket, as you can see in the ssl_pthread_server example
Regards,
Mbed TLS Team member
Ron