Mercurial > hg > nginx-tests
comparison h2_ssl_verify_client.t @ 1986:11463d379570
Tests: reworked HTTP/2 tests to use "http2 on".
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 04 Jun 2024 05:08:02 +0300 |
parents | 6d3a8f4eb9b2 |
children |
comparison
equal
deleted
inserted
replaced
1985:b5e2609d34a3 | 1986:11463d379570 |
---|---|
36 } | 36 } |
37 | 37 |
38 http { | 38 http { |
39 %%TEST_GLOBALS_HTTP%% | 39 %%TEST_GLOBALS_HTTP%% |
40 | 40 |
41 http2 on; | |
41 ssl_certificate_key localhost.key; | 42 ssl_certificate_key localhost.key; |
42 ssl_certificate localhost.crt; | 43 ssl_certificate localhost.crt; |
43 | 44 |
44 ssl_verify_client optional_no_ca; | 45 ssl_verify_client optional_no_ca; |
45 | 46 |
46 add_header X-Verify $ssl_client_verify; | 47 add_header X-Verify $ssl_client_verify; |
47 | 48 |
48 server { | 49 server { |
49 listen 127.0.0.1:8080 ssl http2; | 50 listen 127.0.0.1:8080 ssl; |
50 server_name localhost; | 51 server_name localhost; |
51 | 52 |
52 ssl_client_certificate client.crt; | 53 ssl_client_certificate client.crt; |
53 | 54 |
54 location / { } | 55 location / { } |
55 } | 56 } |
56 | 57 |
57 server { | 58 server { |
58 listen 127.0.0.1:8080 ssl http2; | 59 listen 127.0.0.1:8080 ssl; |
59 server_name example.com; | 60 server_name example.com; |
60 | 61 |
61 location / { } | 62 location / { } |
62 } | 63 } |
63 } | 64 } |
82 or die "Can't create certificate for $name: $!\n"; | 83 or die "Can't create certificate for $name: $!\n"; |
83 } | 84 } |
84 | 85 |
85 $t->write_file('t', 'SEE-THIS'); | 86 $t->write_file('t', 'SEE-THIS'); |
86 | 87 |
87 open OLDERR, ">&", \*STDERR; close STDERR; | |
88 $t->run(); | 88 $t->run(); |
89 open STDERR, ">&", \*OLDERR; | |
90 | 89 |
91 my $s = get_ssl_socket(); | 90 my $s = get_ssl_socket(); |
92 plan(skip_all => 'no alpn') unless $s->alpn_selected(); | 91 plan(skip_all => 'no alpn') unless $s->alpn_selected(); |
93 $t->plan(3); | 92 $t->plan(3); |
94 | 93 |