|
|
Choosing A Webhost: |
Re: are perl-framework apache tests still used?: msg#00024apache.httpd.test.devel
Stas Bekman wrote: Joe Orton wrote: 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> |
|---|---|---|
| Previous by Date: | Re: are perl-framework apache tests still used?, Stas Bekman |
|---|---|
| Next by Date: | flood: Crash when no "usefarmer" specified., ptran |
| Previous by Thread: | Re: are perl-framework apache tests still used?, Stas Bekman |
| Next by Thread: | [PATCH] flood: Add URL DELAYFACTOR to customize delays, ptran |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |