Question

Is it OK if the same OpenSSL context is used by several different accepting sockets?

In particular I'm using the same boost::asio::ssl::context with 2 different listening sockets.

Was it helpful?

Solution

Yep, SSL_CTX--which I believe is the underlying data structure--is just a global data structure used by your program. From ssl(3):

SSL_CTX (SSL Context)

That's the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the SSL structures which are later created for the connections.

OTHER TIPS

It should be OK.

For example a typical RFC4217 FTPS server will use the same SSL context for the control socket and all data sockets within that session.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top