Hi,

I found some bugs while setting up the 0.9.1 release.

* PIN-Verification doesn't work.
* IE-Request generates a wrong DN for the certificate.

I merged this with basic_csr 1.10.2.2 from CVS.

attached: $ diff -bB -C2 basic_csr.orig basic_csr 


        Marco

-- 
Wahrheit ist die Erfindung eines L�gners.
       - Heinz von Foerster -
*** basic_csr.orig      Sun Jan 19 00:09:02 2003
--- basic_csr   Tue Jan 21 12:08:34 2003
***************
*** 4,9 ****
  ##   File Name: basic_csr
  ##       Brief: basic CSR
! ##     Version: $Revision: 1.10 $
! ## Description: this script creates a CSR wthout a keypair
  ##  Parameters: 
   
--- 4,9 ----
  ##   File Name: basic_csr
  ##       Brief: basic CSR
! ##     Version: $Revision: 1.10.2.2b $
! ## Description: this script creates a CSR
  ##  Parameters: 
   
***************
*** 32,36 ****
                        my @h = getRequiredList 
("DN_TYPE_".$type."_ELEMENT_".$i."_SELECT");
                        $html = $query->newInput (
!                                       -regx   => 'LETTERS',
                                        -intype => 'popup_menu',
                                        -name   => 'DN_VALUE_'.$i,
--- 32,36 ----
                        my @h = getRequiredList 
("DN_TYPE_".$type."_ELEMENT_".$i."_SELECT");
                        $html = $query->newInput (
!                                       -regx   => 'MIXED',
                                        -intype => 'popup_menu',
                                        -name   => 'DN_VALUE_'.$i,
***************
*** 93,97 ****
  
        my $html_bits = $query->newInput (
!                               -regx=>'LETTERS',
                                -intype=>'popup_menu',
                                -name=>'bits',
--- 93,97 ----
  
        my $html_bits = $query->newInput (
!                               -regx=>'NUMERIC',
                                -intype=>'popup_menu',
                                -name=>'bits',
***************
*** 160,163 ****
--- 160,174 ----
          $ms_dn =~ s/^\s*emailAddress\s*=/E=/i;
  
+         #FIX for IE-Request
+       #reverse the DN
+         my @tmp_ms_dn = split(/,/,$ms_dn);
+         $ms_dn = "";
+         foreach my $ms_dn_entry ( reverse @tmp_ms_dn){
+             $ms_dn .= $ms_dn_entry . ",";
+       }
+         ## remove trailing ","
+         $ms_dn =~ s/,$//;
+ 
+       
        my $form;
        if( not $form = $tools->getFile( $formFile2 )) {
***************
*** 233,245 ****
                  my $spkac = "";
  
-                 ## load the base dn
-                 my @base = getRequiredList ("DN_TYPE_".$type."_BASE");
-                 for (my $i=1; $i <= scalar @base; $i++) {
-                     if (getRequired ("DN_TYPE_".$type."_BASE_".$i) ne "")
-                     {
-                         $spkac .= $base [$i-1]." = ".getRequired 
("DN_TYPE_".$type."_BASE_".$i)."\n";
-                     }
-                 }
- 
                  ## load the normal DN and build the html-elements
                  my @elements = getRequiredList ("DN_TYPE_".$type."_ELEMENTS");
--- 244,247 ----
***************
*** 255,258 ****
--- 257,269 ----
                  }
  
+                 ## load the base dn
+                 my @base = getRequiredList ("DN_TYPE_".$type."_BASE");
+                 for (my $i=1; $i <= scalar @base; $i++) {
+                     if (getRequired ("DN_TYPE_".$type."_BASE_".$i) ne "")
+                     {
+                         $spkac .= $base [$i-1]." = ".getRequired 
+("DN_TYPE_".$type."_BASE_".$i)."\n";
+                     }
+                 }
+ 
                  ## add the key
                  ## Delete ^M
***************
*** 475,479 ****
  
          }
!         if ($query->param ('PASSWD1'))
          {
              $mistake .= $query->newInputCheck ({
--- 486,490 ----
  
          }
!         if ($query->param ('passwd1'))
          {
              $mistake .= $query->newInputCheck ({
***************
*** 485,492 ****
                              -minlen=>$minPinLength});
          }
!         if (defined $query->param ('PASSWD1') and defined $query->param ('PASSWD2'))
          {
!             if ($query->param ('PASSWD1') ne $query->param ('PASSWD2'))
              {
                  $mistake .= gettext ("Two different pin inserted. Please go 
<B><I>back</I></B> and correct the error.");
              }
--- 496,509 ----
                              -minlen=>$minPinLength});
          }
!       
!       #quick hack, to get a nicer output..
!         my $tmp = "<BR>|OK|[\ \(\)]";
!         $mistake =~ s/$tmp//g;
! 
!         if (defined $query->param ('passwd1') and defined $query->param ('passwd2'))
          {
!             if ($query->param ('passwd1') ne $query->param ('passwd2'))
              {
+               $mistake .= "<BR>";
                  $mistake .= gettext ("Two different pin inserted. Please go 
<B><I>back</I></B> and correct the error.");
              }
***************
*** 499,504 ****
          };
  
-         my $tmp = "<BR>|OK|[\ \(\)]";
-         $mistake =~ s/$tmp//g;
  
      } else {
--- 516,519 ----

Reply via email to