Mercurial > hg > nginx-tests
comparison stream_proxy_ssl.t @ 1197:155573499f20
Tests: more ssl session tests.
Check that SSL session can be resumed if it was retrieved
from within or after the abbreviated handshake.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 20 Jul 2017 14:47:59 +0300 |
parents | af7feabed82a |
children | 0af58b78df35 |
comparison
equal
deleted
inserted
replaced
1196:68c8f2778c50 | 1197:155573499f20 |
---|---|
23 select STDERR; $| = 1; | 23 select STDERR; $| = 1; |
24 select STDOUT; $| = 1; | 24 select STDOUT; $| = 1; |
25 | 25 |
26 my $t = Test::Nginx->new()->has(qw/stream stream_ssl http http_ssl/) | 26 my $t = Test::Nginx->new()->has(qw/stream stream_ssl http http_ssl/) |
27 ->has(qw/stream_return/) | 27 ->has(qw/stream_return/) |
28 ->has_daemon('openssl')->plan(5); | 28 ->has_daemon('openssl')->plan(6); |
29 | 29 |
30 $t->write_file_expand('nginx.conf', <<'EOF'); | 30 $t->write_file_expand('nginx.conf', <<'EOF'); |
31 | 31 |
32 %%TEST_GLOBALS%% | 32 %%TEST_GLOBALS%% |
33 | 33 |
108 is(stream('127.0.0.1:' . port(8081))->read(), '.', 'ssl'); | 108 is(stream('127.0.0.1:' . port(8081))->read(), '.', 'ssl'); |
109 is(stream('127.0.0.1:' . port(8081))->read(), '.', 'ssl 2'); | 109 is(stream('127.0.0.1:' . port(8081))->read(), '.', 'ssl 2'); |
110 | 110 |
111 is(stream('127.0.0.1:' . port(8082))->read(), '.', 'ssl session new'); | 111 is(stream('127.0.0.1:' . port(8082))->read(), '.', 'ssl session new'); |
112 is(stream('127.0.0.1:' . port(8082))->read(), 'r', 'ssl session reused'); | 112 is(stream('127.0.0.1:' . port(8082))->read(), 'r', 'ssl session reused'); |
113 is(stream('127.0.0.1:' . port(8082))->read(), 'r', 'ssl session reused 2'); | |
113 | 114 |
114 my $s = http('', start => 1); | 115 my $s = http('', start => 1); |
115 | 116 |
116 sleep 3; | 117 sleep 3; |
117 | 118 |