Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: are perl-framework apache tests still used?: msg#00024

apache.httpd.test.devel

Subject: Re: are perl-framework apache tests still used?

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 => 'test-dev@xxxxxxxxxxxxxxxx',
+ $email_field => 'test-dev@xxxxxxxxxxxxxxxx',
},
};

@@ -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:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
version-control...    qnx.openqnx.dev...    redhat.rhn.user...    ietf.openpgp/20...    mail.mutt.user/...    web.microformat...    java.sync4j.use...    education.ezpro...    user-groups.blu...    solaris.manager...    org.fitug.debat...    technology.erps...    politics.activi...    linux.redhat.fe...    bug-tracking.ma...    xfce.user/2004-...    hams/2004-11/ms...    kde.users.pim/2...    culture.cooking...    freebsd.devel.x...    gnu.m4.adhoc/20...    ngpt.user/2002-...    apple.fink.deve...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation