Update of /cvsroot/openca/openca-0.9/src/common/lib/functions In directory usw-pr-cvs1:/tmp/cvs-serv15889/openca-0.9/src/common/lib/functions Modified Files: crypto-utils.lib csr-utils.lib export-import.lib ldap-utils.lib mail-utils.lib misc-utils.lib rbac-utils.lib Log Message: last preparations for i18n Index: crypto-utils.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/crypto-utils.lib,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** crypto-utils.lib 26 Sep 2002 14:06:54 -0000 1.7 --- crypto-utils.lib 27 Sep 2002 10:46:09 -0000 1.8 *************** *** 46,50 **** ## 6101 Parameters error, needed at least item or object ## 6102 The PKCS#7-object signals an error. The signature is not valid. ! ## 6103 Signer's certificate is corrupt! ## 6104 Signer's Certificate and DB's Certificate do not match. ## --- 46,50 ---- ## 6101 Parameters error, needed at least item or object ## 6102 The PKCS#7-object signals an error. The signature is not valid. ! ##// 6103 Signer's certificate is corrupt! ## 6104 Signer's Certificate and DB's Certificate do not match. ## *************** *** 85,93 **** ## 6731 Cannot get a DN from the request! ## 6735 A Valid Certificate with same DN exists! ! ## 6741 Cannot create backup for OpenSSL's indexfile! ! ## 6742 Cannot create backup for OpenSSL's serialfile! ## 6751 openssl->issueCert failed ## 6755 objectcreation from new cert failed ! ## 6757 Error while storing the request's serial in cert-object ## 6761 Error while signing Role ## 6762 Error while storing role in cert-object --- 85,93 ---- ## 6731 Cannot get a DN from the request! ## 6735 A Valid Certificate with same DN exists! ! ##// 6741 Cannot create backup for OpenSSL's indexfile! ! ##// 6742 Cannot create backup for OpenSSL's serialfile! ## 6751 openssl->issueCert failed ## 6755 objectcreation from new cert failed ! ##// 6757 Error while storing the request's serial in cert-object ## 6761 Error while signing Role ## 6762 Error while storing role in cert-object *************** *** 492,496 **** if (not (defined $keys->{OCSP} and ($keys->{OCSP} =~ /Y|ON/i))) { ## write serial ! print addLogSection ("Writing serial (".$keys->{SERIAL}.") ..."); if (not open( FD, ">$keys->{SERIAL}" )) { $errno = 6402; --- 492,496 ---- if (not (defined $keys->{OCSP} and ($keys->{OCSP} =~ /Y|ON/i))) { ## write serial ! print addLogSection ( i18nGettext ("Writing serial __CERT_SERIAL__ ...", "__CERT_SERIAL__", $keys->{SERIAL})); if (not open( FD, ">$keys->{SERIAL}" )) { $errno = 6402; *************** *** 626,630 **** if( not $req ) { $errno = 6711; ! $errval = i18nGettext("Cannot Access $key Request! Database returns errorcode __ERRNO__ (__ERRVAL__).", "__ERRNO__", $db->errno(), "__ERRVAL__", $db->errval); --- 626,631 ---- if( not $req ) { $errno = 6711; ! $errval = i18nGettext("Cannot Access __CSR_SERIAL__ Request! Database returns errorcode __ERRNO__ (__ERRVAL__).", ! "__CSR_SERIAL__", $key, "__ERRNO__", $db->errno(), "__ERRVAL__", $db->errval); *************** *** 680,684 **** ( $query->getFile("$SSLSerial") =~ /([0-9a-f]+)/i ); ! ## Let's save the request body to a temp file if (not $tools->saveFile( FILENAME=>"$tmpdir/${ser}.req", DATA=>$req->getParsed()->{BODY}."\n" )) { --- 681,685 ---- ( $query->getFile("$SSLSerial") =~ /([0-9a-f]+)/i ); ! ##// Let's save the request body to a temp file if (not $tools->saveFile( FILENAME=>"$tmpdir/${ser}.req", DATA=>$req->getParsed()->{BODY}."\n" )) { *************** *** 689,693 **** ## set configFile from OpenSSL/ ! # it's senseless to do this because all blanks were replaced # by underscores some lines above # $extfile =~ s/ /\\ /g; --- 690,694 ---- ## set configFile from OpenSSL/ ! #// it's senseless to do this because all blanks were replaced # by underscores some lines above # $extfile =~ s/ /\\ /g; *************** *** 699,703 **** my $attribute_name; ! # perhaps the request's serial must be stored in the dn my $use_request_serial = getRequired ('SET_REQUEST_SERIAL_IN_DN'); my $request_serial_name = ""; --- 700,704 ---- my $attribute_name; ! #// perhaps the request's serial must be stored in the dn my $use_request_serial = getRequired ('SET_REQUEST_SERIAL_IN_DN'); my $request_serial_name = ""; *************** *** 706,710 **** } ! # perhaps the cert's serial must be stored in the dn my $use_cert_serial = getRequired ('SET_CERTIFICATE_SERIAL_IN_DN'); my $cert_serial_name = ""; --- 707,711 ---- } ! #// perhaps the cert's serial must be stored in the dn my $use_cert_serial = getRequired ('SET_CERTIFICATE_SERIAL_IN_DN'); my $cert_serial_name = ""; *************** *** 749,753 **** # set the subjectAlternativeName ! # * we don't use email:copy to be able to support PKIX-recommendations # and S/MIME v3 # * Email should not be in the DN so email:copy is senseless --- 750,754 ---- # set the subjectAlternativeName ! #// * we don't use email:copy to be able to support PKIX-recommendations # and S/MIME v3 # * Email should not be in the DN so email:copy is senseless *************** *** 794,798 **** libIssueCertificateRestoreOpensslState (); $errno = 6751; ! $errval = i18nGettext ("Error while issuing Certificate to __NAME__ (filename: __FILE__). <br><br>\nOpenCA::OpenSSL returns errocode _ERRNO__ (__ERRVAL__).", "__NAME__", $req->getParsed()->{DN_HASH}->{CN}[0], "__FILE__", "$tmpdir/${ser}.req", --- 795,799 ---- libIssueCertificateRestoreOpensslState (); $errno = 6751; ! $errval = i18nGettext ("Error while issuing Certificate to __NAME__ (filename: __FILE__). <br><br>\nOpenCA::OpenSSL returns errocode __ERRNO__ (__ERRVAL__).", "__NAME__", $req->getParsed()->{DN_HASH}->{CN}[0], "__FILE__", "$tmpdir/${ser}.req", *************** *** 882,886 **** ## which PIN should be used ? if ($use_req_pin and ($use_req_pin =~ /^YES$/i)) { ! ## use request's PIN ## load prepared mail $msg = $tools->getFile (getRequired ('REQUEST_PIN_MAIL')); --- 883,887 ---- ## which PIN should be used ? if ($use_req_pin and ($use_req_pin =~ /^YES$/i)) { ! ##// use request's PIN ## load prepared mail $msg = $tools->getFile (getRequired ('REQUEST_PIN_MAIL')); *************** *** 948,952 **** ## sign and encrypt ! ## sign deactivated because of a mismatch with the CA's-extensions my $enc_msg; if ( defined $cert->getParsed()->{EMAILADDRESS} and $cert->getParsed()->{EMAILADDRESS} ) { --- 949,953 ---- ## sign and encrypt ! ##// sign deactivated because of a mismatch with the CA's-extensions my $enc_msg; if ( defined $cert->getParsed()->{EMAILADDRESS} and $cert->getParsed()->{EMAILADDRESS} ) { *************** *** 1055,1059 **** ## Put the Request in the archived requests DBM. This is built ! ## as $serial=>$req where the serial is the certificate's ## serial number and the req is the request file --- 1056,1060 ---- ## Put the Request in the archived requests DBM. This is built ! ##// as $serial=>$req where the serial is the certificate's ## serial number and the req is the request file Index: csr-utils.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/csr-utils.lib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** csr-utils.lib 26 Sep 2002 14:06:54 -0000 1.3 --- csr-utils.lib 27 Sep 2002 10:46:09 -0000 1.4 *************** *** 42,46 **** if( not $form = $tools->getFile( $fileName )) { ! configError("Can not load $fileName!"); } --- 42,46 ---- if( not $form = $tools->getFile( $fileName )) { ! configError(i18nGettext ("Can not load __FILE__!", "__FILE__", $fileName)); } *************** *** 56,60 **** -action=>$query->self_url()); ! ## Let's buid the page $page = $header . $form; --- 56,60 ---- -action=>$query->self_url()); ! ##// Let's buid the page $page = $header . $form; *************** *** 154,158 **** -action=>$query->referer() ); ! ## Let's buid the page $page = $header . $form; --- 154,158 ---- -action=>$query->referer() ); ! ##// Let's buid the page $page = $header . $form; *************** *** 206,210 **** ); ! ## Let's Build the Page $page = $header . $form; $req = $query->param('request'); --- 206,210 ---- ); ! ##// Let's Build the Page $page = $header . $form; $req = $query->param('request'); Index: export-import.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/export-import.lib,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** export-import.lib 26 Sep 2002 14:06:54 -0000 1.4 --- export-import.lib 27 Sep 2002 10:46:09 -0000 1.5 *************** *** 483,487 **** MODE => "UPDATE" )) { $filename =~ s/.*\///; ! print addPreLogLine (i18nGettext ("__STATUS_____OBJECT__ updated from __FILE.", "__STATUS__", $status, "__OBJECT__", $object, --- 483,487 ---- MODE => "UPDATE" )) { $filename =~ s/.*\///; ! print addPreLogLine (i18nGettext ("__STATUS_____OBJECT__ updated from __FILE__.", "__STATUS__", $status, "__OBJECT__", $object, *************** *** 625,629 **** "__SERIAL__", $serial, "__FORMAT__", lc $format)."</FONT>"); ! print addPreLogLine ( "<FONT COLOR=#FF0000>i18nGettext ("FILE: __FILE__", "__FILE__", $filename)."</FONT>"); } } --- 625,629 ---- "__SERIAL__", $serial, "__FORMAT__", lc $format)."</FONT>"); ! print addPreLogLine ( "<FONT COLOR=#FF0000>".i18nGettext ("FILE: __FILE__", "__FILE__", $filename)."</FONT>"); } } *************** *** 967,971 **** ######################### 4. ############################# ! ## check for correct certificate's state if CRR is on the way or successful if ( ($datatype [0] =~ /CRR/i) and ($next_status !~ /DELETED/i) ) { --- 967,971 ---- ######################### 4. ############################# ! ##// check for correct certificate's state if CRR is on the way or successful if ( ($datatype [0] =~ /CRR/i) and ($next_status !~ /DELETED/i) ) { *************** *** 1029,1033 **** } ! ## check correct certificate's state if CRR is deleted if ( ($datatype [0] =~ /CRR/i) and ($next_status =~ /DELETED/i) ) { --- 1029,1033 ---- } ! ##// check correct certificate's state if CRR is deleted if ( ($datatype [0] =~ /CRR/i) and ($next_status =~ /DELETED/i) ) { *************** *** 1084,1098 **** if ($old_status !~ /REVOKED/i) { if (scalar @list_3) { ! ## certificate's state is revoked $db->updateStatus ( DATATYPE => $old_status."_CERTIFICATE", NEWTYPE => "REVOKED_CERTIFICATE", OBJECT => $item); } elsif (scalar @list_1 or scalar @list_2) { ! ## certificate's state is suspended $db->updateStatus ( DATATYPE => $old_status."_CERTIFICATE", NEWTYPE => "SUSPENDED_CERTIFICATE", OBJECT => $item); } else { ! ## certificate's state is valid (or expired) again $db->updateStatus ( DATATYPE => $old_status."_CERTIFICATE", NEWTYPE => "VALID_CERTIFICATE", --- 1084,1098 ---- if ($old_status !~ /REVOKED/i) { if (scalar @list_3) { ! ##// certificate's state is revoked $db->updateStatus ( DATATYPE => $old_status."_CERTIFICATE", NEWTYPE => "REVOKED_CERTIFICATE", OBJECT => $item); } elsif (scalar @list_1 or scalar @list_2) { ! ##// certificate's state is suspended $db->updateStatus ( DATATYPE => $old_status."_CERTIFICATE", NEWTYPE => "SUSPENDED_CERTIFICATE", OBJECT => $item); } else { ! ##// certificate's state is valid (or expired) again $db->updateStatus ( DATATYPE => $old_status."_CERTIFICATE", NEWTYPE => "VALID_CERTIFICATE", *************** *** 1224,1228 **** } ! ## what I'm doing here??? ## upating lastImport my $txt = ""; --- 1224,1228 ---- } ! ##// what I'm doing here??? ## upating lastImport my $txt = ""; *************** *** 1332,1336 **** print closeLogSection (); ! # Now we copy the CA's certificate to the chain dir my $cacertCRT = getRequired ('CACertificateCRT'); if (not $tools->copyFiles( SRC => $CACert, --- 1332,1336 ---- print closeLogSection (); ! #// Now we copy the CA's certificate to the chain dir my $cacertCRT = getRequired ('CACertificateCRT'); if (not $tools->copyFiles( SRC => $CACert, *************** *** 1345,1349 **** } ! # Let's make Chain verification print addLogSection(gettext ("Re-Building CA Chain ... ")); my $chainDir = getRequired ( 'ChainDir' ); --- 1345,1349 ---- } ! ##// Let's make Chain verification print addLogSection(gettext ("Re-Building CA Chain ... ")); my $chainDir = getRequired ( 'ChainDir' ); *************** *** 1412,1416 **** } else { print addPreLogLine ("<FONT COLOR=##FF0000>". ! i18nGettext ("Cannot change the status of the certificate __DN__ (__CERT_SERIAL__)." "__DN__", $data->getParsed()->{REVOKE_CERTIFICATE_DN}, "__CERT_SERIAL__", $data->getParsed->{REVOKE_CERTIFICATE_SERIAL}). --- 1412,1416 ---- } else { print addPreLogLine ("<FONT COLOR=##FF0000>". ! i18nGettext ("Cannot change the status of the certificate __DN__ (__CERT_SERIAL__).", "__DN__", $data->getParsed()->{REVOKE_CERTIFICATE_DN}, "__CERT_SERIAL__", $data->getParsed->{REVOKE_CERTIFICATE_SERIAL}). *************** *** 1820,1824 **** my $ret = `cd $dir; tar -c * | tar -x -C $bp_dir 2>&1`; if( $? != 0 ) { - print addErrorLog("Cannot copy $dir to $bp_dir!"); print addErrorLog(i18nGettext ("Cannot copy __SRC_DIR__ to __DEST_DIR__!", "__SRC_DIR__", $dir, --- 1820,1823 ---- Index: ldap-utils.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/ldap-utils.lib,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ldap-utils.lib 26 Sep 2002 14:06:54 -0000 1.5 --- ldap-utils.lib 27 Sep 2002 10:46:09 -0000 1.6 *************** *** 52,59 **** } ! ## This file has the latest imported certificate's serials $filename = "$certDir/lastImport.txt"; ! ## Let's open the lastImport.txt if( not -e "$filename" ) { configError( i18nGettext ("File __FILE__ not found!", "__FILE__", $filename)); --- 52,59 ---- } ! ##// This file has the latest imported certificate's serials $filename = "$certDir/lastImport.txt"; ! ##// Let's open the lastImport.txt if( not -e "$filename" ) { configError( i18nGettext ("File __FILE__ not found!", "__FILE__", $filename)); *************** *** 83,87 **** ( $serID ) = ( $ID =~ /([a-f0-9]+)/i ); ! ## Let's be sure it is in the right format $serID = uc( $serID ); $serID = "0$serID" if( length($serID) % 2 ); --- 83,87 ---- ( $serID ) = ( $ID =~ /([a-f0-9]+)/i ); ! ##// Let's be sure it is in the right format $serID = uc( $serID ); $serID = "0$serID" if( length($serID) % 2 ); *************** *** 193,197 **** }; ! ## Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if( not $ret->{STATUS} ) { --- 193,197 ---- }; ! ##// Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if( not $ret->{STATUS} ) { *************** *** 331,335 **** ## insert the different types ! ## attention: I don't insert here a CA!!! ## this most be done otherwise because I cannot declare ## any o and ou to be a (sub)CA --- 331,335 ---- ## insert the different types ! ##// attention: I don't insert here a CA!!! ## this most be done otherwise because I cannot declare ## any o and ou to be a (sub)CA *************** *** 487,491 **** } ! ## Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if ( not $ret->{STATUS} ) { --- 487,491 ---- } ! ##// Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if ( not $ret->{STATUS} ) { *************** *** 634,638 **** } ! ## Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if ( not $ret->{STATUS} ) { --- 634,638 ---- } ! ##// Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if ( not $ret->{STATUS} ) { *************** *** 719,723 **** $entry->replace ( $attr => [ @values ] ); } ! ## doens't work ## if ( (not scalar @values) and ## ($attr !~ /userCertificate/i) --- 719,723 ---- $entry->replace ( $attr => [ @values ] ); } ! ##// doens't work ## if ( (not scalar @values) and ## ($attr !~ /userCertificate/i) *************** *** 789,793 **** }; ! ## Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if( not $ret->{STATUS} ) { --- 789,793 ---- }; ! ##// Let's bind for a predetermined User $ret = LDAP_bind( LDAP => $ldap ); if( not $ret->{STATUS} ) { Index: mail-utils.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/mail-utils.lib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mail-utils.lib 26 Sep 2002 14:06:54 -0000 1.3 --- mail-utils.lib 27 Sep 2002 10:46:09 -0000 1.4 *************** *** 27,31 **** ## ! ## librarie's errorcode is 45 ## ## warnUsers 10 --- 27,31 ---- ## ! ##// library's errorcode is 45 ## ## warnUsers 10 *************** *** 52,56 **** $filename = "$certDir/lastImport.txt"; ! ## Let's open the lastImport.txt if( not -e "$filename" ) { configError( i18nGettext ("File __FILE__ not found!", "__FILE__", $filename)); --- 52,56 ---- $filename = "$certDir/lastImport.txt"; ! ##// Let's open the lastImport.txt if( not -e "$filename" ) { configError( i18nGettext ("File __FILE__ not found!", "__FILE__", $filename)); *************** *** 70,74 **** ( $serID ) = ( $ID =~ /([a-f0-9]+)/i ); ! ## Let's be sure it is in the right format $serID = uc( $serID ); $serID = "0$serID" if( length($serID) % 2 ); --- 70,74 ---- ( $serID ) = ( $ID =~ /([a-f0-9]+)/i ); ! ##// Let's be sure it is in the right format $serID = uc( $serID ); $serID = "0$serID" if( length($serID) % 2 ); *************** *** 113,117 **** }; ! print gettext ("Sending Mail") [" . $cert->getSerial() . "] : " . "<B>".gettext ("Mail sent succesfully")."</B>.<BR><BR>\n"; } --- 113,117 ---- }; ! print gettext ("Sending Mail") ."[" . $cert->getSerial() . "] : " . "<B>".gettext ("Mail sent succesfully")."</B>.<BR><BR>\n"; } Index: misc-utils.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/misc-utils.lib,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** misc-utils.lib 27 Sep 2002 07:24:28 -0000 1.7 --- misc-utils.lib 27 Sep 2002 10:46:09 -0000 1.8 *************** *** 285,289 **** } ! ## Now Let's Open the Directory opendir ( CERTS , "$from" ) or return undef; @certList = grep(/$filter/, readdir( CERTS ) ); --- 285,289 ---- } ! ##// Now Let's Open the Directory opendir ( CERTS , "$from" ) or return undef; @certList = grep(/$filter/, readdir( CERTS ) ); *************** *** 296,300 **** ## We must read and then save the file because ! ## the link/unlink doesn't work with multiple ## cross devices. --- 296,300 ---- ## We must read and then save the file because ! ##// the link/unlink doesn't work with multiple ## cross devices. *************** *** 313,317 **** $cmd = $_[0]; ! ## Let's get the commands directly from the cmds/ directory. ## The require will load and execute it my $command = getRequired ('CgiCmdsPath')."/$cmd"; --- 313,317 ---- $cmd = $_[0]; ! ##// Let's get the commands directly from the cmds/ directory. ## The require will load and execute it my $command = getRequired ('CgiCmdsPath')."/$cmd"; Index: rbac-utils.lib =================================================================== RCS file: /cvsroot/openca/openca-0.9/src/common/lib/functions/rbac-utils.lib,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rbac-utils.lib 27 Sep 2002 07:24:28 -0000 1.4 --- rbac-utils.lib 27 Sep 2002 10:46:09 -0000 1.5 *************** *** 80,84 **** ## senseless if the machine is already cracked ! ## ## check signature of script's conf-file ## ## verify ## if ( not $cryptoShell->verify ( --- 80,84 ---- ## senseless if the machine is already cracked ! ##// ## check signature of script's conf-file ## ## verify ## if ( not $cryptoShell->verify ( *************** *** 98,102 **** ## print "rbac-utils.lib: grantAccess: Signature of Script's configfile is ok.<br>\n" if ($DEBUG); ! ## load function's configuration file my $ret; my $rbac_config = new OpenCA::Configuration; --- 98,102 ---- ## print "rbac-utils.lib: grantAccess: Signature of Script's configfile is ok.<br>\n" if ($DEBUG); ! ##// load function's configuration file my $ret; my $rbac_config = new OpenCA::Configuration; |