httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestSSLCA.pm
Date Sun, 09 Feb 2003 23:06:07 GMT
stas        2003/02/09 15:06:07

  Modified:    perl-framework/Apache-Test/lib/Apache TestSSLCA.pm
  Log:
  in openssl-0.9.7 s/Email/emailAddress/ in DN
  
  Revision  Changes    Path
  1.13      +13 -3     httpd-test/perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm
  
  Index: TestSSLCA.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TestSSLCA.pm	3 Apr 2002 17:39:36 -0000	1.12
  +++ TestSSLCA.pm	9 Feb 2003 23:06:07 -0000	1.13
  @@ -21,6 +21,7 @@
   *import = \&Exporter::import;
   
   my $openssl = $ENV{APACHE_TEST_OPENSSL_CMD} || 'openssl';
  +my $version = version();
   
   my $CA = 'asf';
   my $Config; #global Apache::TestConfig object
  @@ -36,6 +37,9 @@
   my $passin  = "-passin pass:$pass";
   my $passout = "-passout pass:$pass";
   
  +# in 0.9.7 s/Email/emailAddress/ in DN
  +my $email_field = $version lt "0.9.7" ? "Email" : "emailAddress";
  +
   my $ca_dn = {
       asf => {
           C  => 'US',
  @@ -44,7 +48,7 @@
           O  => 'ASF',
           OU => 'httpd-test',
           CN => '',
  -        Email => 'test-dev@httpd.apache.org',
  +        $email_field => 'test-dev@httpd.apache.org',
       },
   };
   
  @@ -132,7 +136,7 @@
   
       my $string = "";
   
  -    for my $k (qw(C ST L O OU CN Email)) {
  +    for my $k ((qw(C ST L O OU CN), $email_field)) {
           next unless $dn->{$k};
           $string .= "/$k=$dn->{$k}";
       }
  @@ -185,7 +189,7 @@
   O                      = $dn->{O}
   OU                     = $dn->{OU}
   CN                     = $dn->{CN}
  -emailAddress           = $dn->{Email}
  +emailAddress           = $dn->{$email_field}
   
   [ req_attributes ]
   challengePassword      = $pass
  @@ -488,6 +492,12 @@
   
       return if -d $dir;
       mkdir $dir, 0755;
  +}
  +
  +sub version {
  +    my $version = qx($openssl version);
  +    return $1 if $version =~ /^OpenSSL (\S+) /;
  +    return 0;
   }
   
   1;
  
  
  

Mime
View raw message