Topic: Simultaneously running TLS client and server - how?
Hi, I have a use case where a device needs to simultaneously support both incoming and outgoing TCP connections, for different protocols, all encrypted by TLS. I.e., it needs to act as both a TLS server and client at the same time. I saw the discussion in https://www.wolfssl.com/forums/topic152 … ient.html, i.e use WOLFSSL_EITHER_SIDE and to create a generic context , but "the context role (client or server) is determined on the first connect" makes me believe that this is not sufficient for me.
I need to be able to set up a TLS server using accept() for a couple of protocols and handle incoming connections, and unrelated to this, act as a TLS client and initiate outgoing connect()s for another couple of protocols.
I have successfully implemented the client side, but now I'm not sure how to proceed. I have tried fooling around with creating both a server- and a client context for parallel use, but so far have not managed to make it work. The provided examples all seem to be either clients or servers only.
Is this use case supported by wolfSSL? If so you have any hints on how to make it work?