httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/ssl proxy.t
Date Sat, 30 Mar 2002 05:41:07 GMT
dougm       02/03/29 21:41:07

  Modified:    perl-framework/t/ssl proxy.t
  Log:
  add some tests where downstream server requires a client certificate from the proxy
  
  Revision  Changes    Path
  1.3       +33 -3     httpd-test/perl-framework/t/ssl/proxy.t
  
  Index: proxy.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/ssl/proxy.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- proxy.t	29 Mar 2002 23:56:38 -0000	1.2
  +++ proxy.t	30 Mar 2002 05:41:07 -0000	1.3
  @@ -5,11 +5,41 @@
   use Apache::TestRequest;
   use Apache::TestUtil;
   
  -plan tests => 1, ['mod_proxy'];
  +plan tests => 6, ['mod_proxy'];
   
   Apache::TestRequest::module('proxyssl');
   
  +my $hostport = Apache::TestRequest::hostport();
  +
   ok t_cmp(200,
            GET('/')->code,
  -         "/ with proxyssl"
  -        );
  +         "/ with proxyssl");
  +
  +ok t_cmp(200,
  +         GET('/verify')->code,
  +         "using valid proxyssl client cert");
  +
  +ok t_cmp(403,
  +         GET('/require/snakeoil')->code,
  +         "using invalid proxyssl client cert");
  +
  +my $res = GET('/require-ssl-cgi/env.pl');
  +
  +ok t_cmp(200, $res->code, "protected cgi script");
  +
  +my $body = $res->content || "";
  +
  +my %vars;
  +for my $line (split /\s*\r?\n/, $body) {
  +    my($key, $val) = split /\s*=\s*/, $line, 2;
  +    next unless $key;
  +    $vars{$key} = $val || "";
  +}
  +
  +ok t_cmp($hostport,
  +         $vars{HTTP_X_FORWARDED_HOST},
  +         "X-Forwarded-Host header");
  +
  +ok t_cmp('client_ok',
  +         $vars{SSL_CLIENT_S_DN_CN},
  +         "client subject common name");
  
  
  

Mime
View raw message