comparison ssl_sni.t @ 974:882267679006

Tests: simplified parallel modifications in tests. Mail tests were simplified in c227348453db.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 12 Jul 2016 17:39:03 +0300
parents e9064d691790
children 8ef51dbb5d69
comparison
equal deleted inserted replaced
973:7d7aef8b9f3a 974:882267679006
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:%%PORT_0%% ssl; 40 listen 127.0.0.1:8080 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:%%PORT_0%%; 52 listen 127.0.0.1:8080;
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:' . port(0), 139 PeerAddr => '127.0.0.1:' . port(8080),
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);