Mercurial > hg > nginx-tests
annotate stream_ssl_preread_alpn.t @ 1990:85d88cd5091c
Tests: SSI include stub tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Jul 2024 17:42:55 +0300 |
parents | 46351d990aee |
children |
rev | line source |
---|---|
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
2 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
3 # (C) Sergey Kandaurov |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
4 # (C) Nginx, Inc. |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
5 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
6 # Tests for stream_ssl_preread module, ALPN preread. |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
7 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
8 ############################################################################### |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
9 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
10 use warnings; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
11 use strict; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
12 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
13 use Test::More; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
14 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
15 BEGIN { use FindBin; chdir($FindBin::Bin); } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
16 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
17 use lib 'lib'; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
18 use Test::Nginx; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
19 use Test::Nginx::Stream qw/ stream /; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
20 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
21 ############################################################################### |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
22 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
23 select STDERR; $| = 1; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
24 select STDOUT; $| = 1; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
25 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
26 my $t = Test::Nginx->new()->has(qw/stream stream_map stream_ssl_preread/) |
1858
cdcd75657e52
Tests: added has_feature() tests for IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1609
diff
changeset
|
27 ->has(qw/stream_ssl stream_return socket_ssl_alpn/) |
cdcd75657e52
Tests: added has_feature() tests for IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1609
diff
changeset
|
28 ->has_daemon('openssl')->plan(5) |
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
29 ->write_file_expand('nginx.conf', <<'EOF'); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
30 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
31 %%TEST_GLOBALS%% |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
32 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
33 daemon off; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
34 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
35 events { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
36 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
37 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
38 stream { |
1609
f3ba4c74de31
Tests: added TEST_GLOBALS_STREAM variable support.
Andrei Belov <defan@nginx.com>
parents:
1488
diff
changeset
|
39 %%TEST_GLOBALS_STREAM%% |
f3ba4c74de31
Tests: added TEST_GLOBALS_STREAM variable support.
Andrei Belov <defan@nginx.com>
parents:
1488
diff
changeset
|
40 |
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
41 map $ssl_preread_alpn_protocols $name { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
42 "" 127.0.0.1:8093; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
43 default $ssl_preread_alpn_protocols; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
44 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
45 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
46 upstream foo { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
47 server 127.0.0.1:8091; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
48 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
49 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
50 upstream bar { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
51 server 127.0.0.1:8092; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
52 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
53 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
54 upstream foo,bar { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
55 server 127.0.0.1:8093; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
56 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
57 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
58 ssl_preread on; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
59 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
60 server { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
61 listen 127.0.0.1:8081; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
62 proxy_pass $name; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
63 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
64 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
65 ssl_certificate_key localhost.key; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
66 ssl_certificate localhost.crt; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
67 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
68 server { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
69 listen 127.0.0.1:8091 ssl; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
70 listen 127.0.0.1:8092 ssl; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
71 listen 127.0.0.1:8093 ssl; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
72 ssl_preread off; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
73 return $server_port; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
74 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
75 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
76 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
77 EOF |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
78 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
79 $t->write_file('openssl.conf', <<EOF); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
80 [ req ] |
1488
dbce8fb5f5f8
Tests: align with OpenSSL security level 2.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1421
diff
changeset
|
81 default_bits = 2048 |
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
82 encrypt_key = no |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
83 distinguished_name = req_distinguished_name |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
84 [ req_distinguished_name ] |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
85 EOF |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
86 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
87 my $d = $t->testdir(); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
88 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
89 foreach my $name ('localhost') { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
90 system('openssl req -x509 -new ' |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
91 . "-config $d/openssl.conf -subj /CN=$name/ " |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
92 . "-out $d/$name.crt -keyout $d/$name.key " |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
93 . ">>$d/openssl.out 2>&1") == 0 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
94 or die "Can't create certificate for $name: $!\n"; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
95 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
96 |
1381
97c8280de681
Tests: removed TODO and try_run() checks for legacy versions.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1307
diff
changeset
|
97 $t->run(); |
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
98 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
99 ############################################################################### |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
100 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
101 my ($p1, $p2, $p3) = (port(8091), port(8092), port(8093)); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
102 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
103 is(get_ssl(8081, 'foo'), $p1, 'alpn'); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
104 is(get_ssl(8081, 'foo'), $p1, 'alpn again'); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
105 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
106 is(get_ssl(8081, 'bar'), $p2, 'alpn 2'); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
107 is(get_ssl(8081, 'bar'), $p2, 'alpn 2 again'); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
108 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
109 is(get_ssl(8081, 'foo', 'bar'), $p3, 'alpn many'); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
110 |
1307
23026106e439
Tests: unbreak stream_ssl_preread_alpn.t on OpenSSL < 1.0.2h.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1306
diff
changeset
|
111 get_ssl(8081, ''); |
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
112 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
113 ############################################################################### |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
114 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
115 sub get_ssl { |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
116 my ($port, @alpn) = @_; |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
117 |
1864
46351d990aee
Tests: simplified stream SSL tests with IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1858
diff
changeset
|
118 my $s = stream( |
46351d990aee
Tests: simplified stream SSL tests with IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1858
diff
changeset
|
119 PeerAddr => '127.0.0.1:' . port($port), |
46351d990aee
Tests: simplified stream SSL tests with IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1858
diff
changeset
|
120 SSL => 1, |
46351d990aee
Tests: simplified stream SSL tests with IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1858
diff
changeset
|
121 SSL_alpn_protocols => [ @alpn ] |
46351d990aee
Tests: simplified stream SSL tests with IO::Socket::SSL.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1858
diff
changeset
|
122 ); |
1306
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
123 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
124 return $s->read(); |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
125 } |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
126 |
5e9695bd370a
Tests: stream_ssl_preread module tests, ALPN preread.
Sergey Kandaurov <pluknet@nginx.com>
parents:
diff
changeset
|
127 ############################################################################### |