Topic: [SOLVED] setup multiple TLS connection on the same IP and port
Hi,
Our product have a requirement : it should be establish two different TLS tunnels between client and server on the same IP address and port !
Before, I haven't any experience about this situation. I searched related information on Google, and found that SNI(Server Name Indication) maybe can reach this requirement. Below is my assumption, please help me to review it, is it possible?
In wolfSSL library, there are have one macro named "HAVE_SNI". If I enable this macro, and set different sever name for these two TLS connection, then client/server will receive correct data for different tunnels(maybe wolfSSL API already implemented).
But for my understanding, for the same IP address/port, we only can bind one socket with it. So, how to create two TLS connections in one thread environment? My means is : can we use same TLS context(WOLFSSL_CTX* type), and create two SSL(WOLFSSL* type) connection base on this context?
If my assumption is not possible, please give me some suggestion.
Thank you very much!