Stas Bekman wrote:
Joe Orton wrote:

On Fri, Feb 07, 2003 at 03:34:55PM +1100, Stas Bekman wrote:

I haven't seen any activity with maintaining tests in a while and I have a bunch of ssl tests failing. I remember Ryan working on a new test suite. What's the current status of things? Should Joe's new php tests be committed?

These fail for me:
ssl/basicauth.t                3    1  33.33%  2
ssl/http.t       255 65280     2    2 100.00%  1-2
ssl/proxy.t                  169    5   2.96%  113-117
ssl/varlookup.t               72    4   5.56%  38-39 52-53
5 tests and 6 subtests skipped.



The varlookup.t tests fail if you use OpenSSL 0.9.7, since it uses the string "emailAddress" not "Email" for an e-mail attribute in a DN. I hacked round this by just removing the e-mail attributes from the DN.


It's probably better to fix it, rather than remove tests. How about this:

Actually, there is no need to mangle the version number, since "0.9.6g" lt "0.9.7" will do the right thing. So here is a simpler version:



Index: Apache-Test/lib/Apache/TestSSLCA.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm,v
retrieving revision 1.12
diff -u -r1.12 TestSSLCA.pm
--- Apache-Test/lib/Apache/TestSSLCA.pm 3 Apr 2002 17:39:36 -0000 1.12
+++ Apache-Test/lib/Apache/TestSSLCA.pm 7 Feb 2003 23:33:15 -0000
@@ -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 => '[EMAIL PROTECTED]',
+        $email_field => '[EMAIL PROTECTED]',
     },
 };

@@ -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;


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to