Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share SSL socket with child process

Tags:

ssl

openssl

I'm working at a server that needs to support wss://. The server needs to process the websocket header, to identify the request, and then may decide to pass the SSL context to a worker process. For now, the server uses OpenSSL for SSL comunications, but from my understanding sharing a secure socket between processes is not possible with OpenSSL (tried with SSL_SESSION in parent process and d2i_SSL_SESSION/SSL_CTX_add_session in child process) - reference: http://openssl.6102.n7.nabble.com/How-to-share-SSL-sessions-between-parent-and-child-process-when-doing-fork-exec-td11077.html.

I'm looking to other SSL libraries that may allow this, currently looking at NSS.

Is this possible with any mature open source SSL library?

like image 819
Eduard Suica Avatar asked Sep 18 '26 13:09

Eduard Suica


1 Answers

After a few months of trying to find a way to achieve this with libssl, I decided to make my own TLS implementation. I found no way of implementing this functionality without understanding and modifying libssl (or libressl). I still think is possible, I just didn't find a way. I've implemented a TLS library from scratch and put it on github. Now I have the two needed functions tls_export_context and tls_import_context.

like image 87
Eduard Suica Avatar answered Sep 22 '26 18:09

Eduard Suica



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!