> -----Original Message-----
> From: Richard Könning
> 
> Am 03.11.2012 15:26, schrieb Frediano Ziglio:
> > Hi,
> >    I'm searching for a way to pass a TLS session between two programs
> > under Unix. I can use unix sockets to send the file descriptor but I
> > don't know how to request to OpenSSL crypto information (like
> > algorithm used and key) in order to pass to the other process.
> >
> > Is there a way to do it ?
> 
> Use http://www.openssl.org/docs/ssl/SSL_get_session.html as a starting
> point for reading.

Once you have the SSL_SESSION, convert it to ASN1 (via i2d_SSL_SESSION) and 
dump it to a file. Read that file in with your second program and convert it 
back from ASN1 to SSL_SESSION(via d2i_SSL_SESSION) and add it to the 
SSL_SESSION cache of the SSL_CTX (via SSL_CTX_add_session).


HTH,
Patrick Eisenacher

Reply via email to