Mercurial > hg > nginx-tests
comparison ssl_client_escaped_cert.t @ 1381:97c8280de681
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 08 Oct 2018 15:30:39 +0300 |
parents | 0d9df274e3a3 |
children | 8c764fd93b5e |
comparison
equal
deleted
inserted
replaced
1380:f50c7d90f5c9 | 1381:97c8280de681 |
---|---|
26 plan(skip_all => 'IO::Socket::SSL not installed') if $@; | 26 plan(skip_all => 'IO::Socket::SSL not installed') if $@; |
27 eval { IO::Socket::SSL::SSL_VERIFY_NONE(); }; | 27 eval { IO::Socket::SSL::SSL_VERIFY_NONE(); }; |
28 plan(skip_all => 'IO::Socket::SSL too old') if $@; | 28 plan(skip_all => 'IO::Socket::SSL too old') if $@; |
29 | 29 |
30 my $t = Test::Nginx->new()->has(qw/http http_ssl rewrite/) | 30 my $t = Test::Nginx->new()->has(qw/http http_ssl rewrite/) |
31 ->has_daemon('openssl'); | 31 ->has_daemon('openssl')->plan(3); |
32 | 32 |
33 $t->write_file_expand('nginx.conf', <<'EOF'); | 33 $t->write_file_expand('nginx.conf', <<'EOF'); |
34 | 34 |
35 %%TEST_GLOBALS%% | 35 %%TEST_GLOBALS%% |
36 | 36 |
77 . "-out $d/$name.crt -keyout $d/$name.key " | 77 . "-out $d/$name.crt -keyout $d/$name.key " |
78 . ">>$d/openssl.out 2>&1") == 0 | 78 . ">>$d/openssl.out 2>&1") == 0 |
79 or die "Can't create certificate for $name: $!\n"; | 79 or die "Can't create certificate for $name: $!\n"; |
80 } | 80 } |
81 | 81 |
82 $t->try_run('no ssl_client_escaped_cert')->plan(3); | 82 $t->run(); |
83 | 83 |
84 ############################################################################### | 84 ############################################################################### |
85 | 85 |
86 my ($cert) = cert('/cert') =~ /\x0d\x0a?\x0d\x0a?(.*)/ms; | 86 my ($cert) = cert('/cert') =~ /\x0d\x0a?\x0d\x0a?(.*)/ms; |
87 my ($escaped) = cert('/escaped') =~ /\x0d\x0a?\x0d\x0a?(.*)/ms; | 87 my ($escaped) = cert('/escaped') =~ /\x0d\x0a?\x0d\x0a?(.*)/ms; |