Commits

Anonymous committed 5cc3c56

CWS-TOOLING: integrate CWS jl124
2009-04-01 13:35:16 +0200 jl r270322 : #i100555# alway print out unopkg\'s output when invoked while building the installation sets
2009-04-01 13:32:53 +0200 jl r270321 : #i96697# use smard card even if it cannot generate a DES3 key

Comments (0)

Files changed (2)

solenv/bin/modules/installer/simplepackage.pm

 			while (<UNOPKG>) {push(@unopkgoutput, $_); }
 			close (UNOPKG);
 
+			for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); }
+
 			my $returnvalue = $?;	# $? contains the return value of the systemcall
 
 			if ($returnvalue)
 			{
 				$infoline = "ERROR: Could not execute \"$systemcall\"!\nExitcode: '$returnvalue'\n";
 				push( @installer::globals::logfileinfo, $infoline);	
-				for ( my $j = 0; $j <= $#unopkgoutput; $j++ ) { push( @installer::globals::logfileinfo, "$unopkgoutput[$j]"); }
 				installer::exiter::exit_program("ERROR: $systemcall failed!", "register_extensions");
 			}
 			else

xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx

 			if(pSlot != NULL)
 			{
 				RTL_LOGFILE_TRACE2( "XMLSEC: Found a slot: SlotName=%s, TokenName=%s", PK11_GetSlotName(pSlot), PK11_GetTokenName(pSlot) );
+
+//The following code which is commented out checks if a slot, that is a smart card for example, is
+//				able to generate a symmetric key of type CKM_DES3_CBC. If this fails then this token
+//				will not be used. This key is possibly used for the encryption service. However, all
+//				interfaces and services used for public key signature and encryption are not published
+//				and the encryption is not used in OOo. Therefore it does not do any harm to remove
+//				this code, hence allowing smart cards which cannot generate this type of key.
+//
+//              By doing this, the encryption may fail if a smart card is being used which does not
+//              support this key generation.
+//				
 				pSymKey = PK11_KeyGen( pSlot , CKM_DES3_CBC, NULL, 128, NULL ) ;
-				if( pSymKey == NULL ) 
-				{
-					PK11_FreeSlot( pSlot ) ;
-					RTL_LOGFILE_TRACE( "XMLSEC: Error - pSymKey is NULL" );
-					continue;
-				}
-				
+// 				if( pSymKey == NULL ) 
+// 				{
+// 					PK11_FreeSlot( pSlot ) ;
+// 					RTL_LOGFILE_TRACE( "XMLSEC: Error - pSymKey is NULL" );
+// 					continue;
+// 				}
 				addCryptoSlot(pSlot);
-				PK11_FreeSlot( pSlot ) ;
+                PK11_FreeSlot( pSlot ) ;
 				pSlot = NULL;
 
-				adoptSymKey( pSymKey ) ;
-				PK11_FreeSymKey( pSymKey ) ;
-				pSymKey = NULL;
+                if (pSymKey != NULL)
+                {
+                    adoptSymKey( pSymKey ) ;
+                    PK11_FreeSymKey( pSymKey ) ;
+                    pSymKey = NULL;
+                }
 
 			}// end of if(pSlot != NULL)
 		}// end of for