title: How to do TLS handshake in one process and handle the rest of connection in another process?
body: <p>I've been trying to implement a TLS server.
  Due to some requirements, I need to accept the TLS handshake on one process and do the symmetric crypto operation (and the rest of the TLS connection) on another process (these process run on different devices).
  Currently, I am thinking about 2 possible solutions:</p>
  
  <ol>
  <li>Get the key, iv and some others information from SSL context - pass
  them into the second process along with the socket fd - do enc/dec
  and send/recv via the socket connection. The normal encryption/
  decryption part is not a big problem but the other stuffs (error
  checking, alert, renegotiation...) will be a nightmare.</li>
  <li>Somehow pass the whole SSL context (the SSL struct) to the second
  process and reuse it. I found several questions years ago about this
  approach but none of them have a good answer.</li>
  </ol>
  
  <p>So is there any ways to do the second approach with OpenSSL (someone suggest using TLSe project but I just want to stick with original OpenSSL)?
  If anyone's solved this problem, is there any better solution for it?</p>
  
  <p>Any help will be highly appreciated. Thank you!     </p>