Can a linux service work as both TLS client and server?

Phil Neumiller pneumiller at directstream.com
Fri Nov 15 22:36:31 UTC 2019


Sure, you just need additional threads.  Note: accept is a blocking call so
the thread that runs in (i.e. your server side will block until a packet is
received).  You can write a polling loop using select, that doesn't block. 
The cleanest thing to do is have a thread for client(s) and one for server. 
I have done this with C++17 with TLS1_3_Client and TLS1_3_Server classes
with accept loop member functions started as std::thread.



-----
Phillip Neumiller
Platform Engineering
Directstream, LLC
--
Sent from: http://openssl.6102.n7.nabble.com/OpenSSL-User-f3.html


More information about the openssl-users mailing list