[gnutls-dev] Restore gnutls session after execvp - possible?

Nikos Mavrogiannopoulos nmav at gnutls.org
Mon Jan 16 23:00:23 CET 2006


> Hi,
> 
> I'm developing an IRC client called WeeChat
> (http://weechat.flashtux.org).
> I'm adding a new feature: /upgrade command, which does an execvp() of
> weechat, without closing connections to servers (sockets are still
> open after execvp).
> For some servers, user may connect thru gnutls (SSL), and I need to 
save
> session in file when upgrading, then restore it when starting new
> process.
> Is it possible to do that with gnutls today?

Hello,
 It seems that I've missed this thread completely due to mail problems. 
However it seems that this should be possible with gnutls, though not
perfectly neat. In a socket you can end the TLS connection and start
a new one without closing the socket. This you can have something like:

gnutls_handshake()
gnutls_send/recv() 
gnutls_bye(RDWR)
(here socket is still open)
gnutls_handshake()
gnutls_send/recv() 
gnutls_bye(RDWR)

The second handshake might be a bit slow. But you can as you already
thought, use the resumption feature. Thus the second handshake
will be a fast one and nobody would notice a delay!

regards,

Nikos




More information about the Gnutls-devel mailing list