comparison ssl_sni.t @ 952:e9064d691790

Tests: converted tests to run in parallel.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 21 Jun 2016 16:39:13 +0300
parents f4aab0e66ed0
children 882267679006
comparison
equal deleted inserted replaced
951:9361c7eddfc1 952:e9064d691790
35 35
36 http { 36 http {
37 %%TEST_GLOBALS_HTTP%% 37 %%TEST_GLOBALS_HTTP%%
38 38
39 server { 39 server {
40 listen 127.0.0.1:8443 ssl; 40 listen 127.0.0.1:%%PORT_0%% ssl;
41 server_name localhost; 41 server_name localhost;
42 42
43 ssl_certificate_key localhost.key; 43 ssl_certificate_key localhost.key;
44 ssl_certificate localhost.crt; 44 ssl_certificate localhost.crt;
45 45
47 return 200 $server_name; 47 return 200 $server_name;
48 } 48 }
49 } 49 }
50 50
51 server { 51 server {
52 listen 127.0.0.1:8443; 52 listen 127.0.0.1:%%PORT_0%%;
53 server_name example.com; 53 server_name example.com;
54 54
55 ssl_certificate_key example.com.key; 55 ssl_certificate_key example.com.key;
56 ssl_certificate example.com.crt; 56 ssl_certificate example.com.crt;
57 57
134 local $SIG{ALRM} = sub { die "timeout\n" }; 134 local $SIG{ALRM} = sub { die "timeout\n" };
135 local $SIG{PIPE} = sub { die "sigpipe\n" }; 135 local $SIG{PIPE} = sub { die "sigpipe\n" };
136 alarm(2); 136 alarm(2);
137 $s = IO::Socket::SSL->new( 137 $s = IO::Socket::SSL->new(
138 Proto => 'tcp', 138 Proto => 'tcp',
139 PeerAddr => '127.0.0.1:8443', 139 PeerAddr => '127.0.0.1:' . port(0),
140 SSL_hostname => $host, 140 SSL_hostname => $host,
141 SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(), 141 SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(),
142 SSL_error_trap => sub { die $_[1] } 142 SSL_error_trap => sub { die $_[1] }
143 ); 143 );
144 alarm(0); 144 alarm(0);