comparison proxy_ssl_certificate.t @ 643:02bb93aebaa5

Tests: minor cleanup, no functional changes.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 13 Aug 2015 11:34:53 +0300
parents 907e89fba9c3
children e9064d691790
comparison
equal deleted inserted replaced
642:555e718a70a5 643:02bb93aebaa5
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 2
3 # (C) Sergey Kandaurov 3 # (C) Sergey Kandaurov
4 # (C) Nginx, Inc. 4 # (C) Nginx, Inc.
5 5
6 # Tests for proxy with proxy certificate to ssl backend. 6 # Tests for http proxy module with proxy certificate to ssl backend.
7 # The proxy_ssl_certificate and proxy_ssl_password_file directives. 7 # The proxy_ssl_certificate and proxy_ssl_password_file directives.
8 8
9 ############################################################################### 9 ###############################################################################
10 10
11 use warnings; 11 use warnings;
133 133
134 $t->run(); 134 $t->run();
135 135
136 ############################################################################### 136 ###############################################################################
137 137
138 my $cert;
139
140 like(http_get('/verify'), qr/X-Verify: SUCCESS/ms, 'verify certificate'); 138 like(http_get('/verify'), qr/X-Verify: SUCCESS/ms, 'verify certificate');
141 like(http_get('/fail'), qr/X-Verify: FAILED/ms, 'fail certificate'); 139 like(http_get('/fail'), qr/X-Verify: FAILED/ms, 'fail certificate');
142 like(http_get('/encrypted'), qr/X-Verify: SUCCESS/ms, 'with encrypted key'); 140 like(http_get('/encrypted'), qr/X-Verify: SUCCESS/ms, 'with encrypted key');
143 141
144 like(http_get('/verify'), qr!X-Name: /CN=1.example!, 'valid certificate'); 142 like(http_get('/verify'), qr!X-Name: /CN=1.example!, 'valid certificate');