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/Apache-Test/lib/Apache TestSSLCA.pm
Date Fri, 08 Mar 2002 18:19:55 GMT
dougm       02/03/08 10:19:55

  Modified:    perl-framework/Apache-Test/lib/Apache TestSSLCA.pm
  Log:
  generate DSA versions of the server certs/keys
  
  Revision  Changes    Path
  1.10      +22 -2     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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestSSLCA.pm	3 Mar 2002 01:10:53 -0000	1.9
  +++ TestSSLCA.pm	8 Mar 2002 18:19:55 -0000	1.10
  @@ -75,6 +75,14 @@
       },
   };
   
  +#generate DSA versions of the server certs/keys
  +while (my($key, $val) = each %$cert_dn) {
  +    next unless $key =~ /^server/;
  +    my $name = join '_', $key, 'dsa';
  +    $cert_dn->{$name} = { %$val }; #copy
  +    $cert_dn->{$name}->{OU} =~ s/rsa/dsa/;
  +}
  +
   sub ca_dn {
       $ca_dn = shift if @_;
       $ca_dn;
  @@ -248,7 +256,19 @@
   
       my $encrypt = @_ ? "@_ $passout" : "";
   
  -    openssl genrsa => "-out keys/$name.pem $encrypt 1024";
  +    my $out = "-out keys/$name.pem $encrypt";
  +
  +    if ($name =~ /dsa/) {
  +        #this takes a long time so just do it once
  +        #don't do this in real life
  +        unless (-e 'dsa-param') {
  +            openssl dsaparam => '-inform PEM -out dsa-param 1024';
  +        }
  +        openssl gendsa => "dsa-param $out";
  +    }
  +    else {
  +        openssl genrsa => "$out 1024";
  +    }
   }
   
   sub new_cert {
  @@ -317,7 +337,7 @@
   
       for my $name (@names) {
           my @key_args = ();
  -        if ($name =~ /_des3$/) {
  +        if ($name =~ /_des3/) {
               push @key_args, '-des3';
           }
   
  
  
  

Mime
View raw message