diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 54c931aee..d75141174 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -1690,6 +1690,7 @@ static int ssl_write_server_hello( ssl_context *ssl ) ssl->f_get_cache != NULL && ssl->f_get_cache( ssl->p_get_cache, ssl->session_negotiate ) == 0 ) { + SSL_DEBUG_MSG( 3, ( "session successfully restored from cache" ) ); ssl->handshake->resume = 1; } diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index a845110c6..fa21e4c14 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -86,7 +86,33 @@ killall -q openssl ssl_server ssl_server2 run_test "Truncated HMAC" \ "debug_level=5" \ - "debug_level=5 trunc_hmac=1 \ - force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ + "trunc_hmac=1 force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ 0 \ - -s "dumping 'computed mac' (10 bytes)$" + -s "dumping 'computed mac' (10 bytes)" + +run_test "Session resume using tickets" \ + "debug_level=4 tickets=1" \ + "debug_level=4 reconnect=1 tickets=1" \ + 0 \ + -S "session successfully restored from cache" \ + -s "session successfully restored from ticket" \ + -s "a session has been resumed" \ + -c "a session has been resumed" + +run_test "Session resume using cache #1" \ + "debug_level=4 tickets=0" \ + "debug_level=4 reconnect=1 tickets=1" \ + 0 \ + -s "session successfully restored from cache" \ + -S "session successfully restored from ticket" \ + -s "a session has been resumed" \ + -c "a session has been resumed" + +run_test "Session resume using cache #2" \ + "debug_level=4 tickets=1" \ + "debug_level=4 reconnect=1 tickets=0" \ + 0 \ + -s "session successfully restored from cache" \ + -S "session successfully restored from ticket" \ + -s "a session has been resumed" \ + -c "a session has been resumed"