diff -cr stunnel-3.8/ssl.c stunnel-3.8.sessid/ssl.c
*** stunnel-3.8/ssl.c	Fri Feb 18 07:26:48 2000
--- stunnel-3.8.sessid/ssl.c	Sat Jun 10 19:01:37 2000
***************
*** 322,327 ****
--- 322,331 ----
      SSL_set_session_id_context(ssl, sid_ctx, strlen(sid_ctx));
  #endif
      if(options.option&OPT_CLIENT) {
+ 	/* Attempt to use the most recent id in the session cache */
+ 	if ( ctx->session_cache_head )
+ 	    if ( ! SSL_set_session(ssl, ctx->session_cache_head) )
+ 		log(LOG_WARNING, "Cannot set SSL session id to most recent used");
          SSL_set_fd(ssl, remote);
          SSL_set_connect_state(ssl);
          if(SSL_connect(ssl)<=0) {
