installationservices/swi/source/swis/server/installmachine.cpp
changeset 42 d17dc5398051
parent 33 8110bf1194d1
child 77 d1838696558c
equal deleted inserted replaced
37:6e7b00453237 42:d17dc5398051
    79 	// Deregister the force registered applications from AppArc
    79 	// Deregister the force registered applications from AppArc
    80 	DEBUG_PRINTF(_L8("Deregistering the force registered applications with AppArc"));
    80 	DEBUG_PRINTF(_L8("Deregistering the force registered applications with AppArc"));
    81 	RSisLauncherSession launcher;
    81 	RSisLauncherSession launcher;
    82 	CleanupClosePushL(launcher);
    82 	CleanupClosePushL(launcher);
    83 	User::LeaveIfError(launcher.Connect());
    83 	User::LeaveIfError(launcher.Connect());
    84 	RPointerArray<Usif::CApplicationRegistrationData> emptyAppRegDataArray;
    84 	RArray<TAppUpdateInfo> emptyAppRegDataArray;
    85 	launcher.NotifyNewAppsL(emptyAppRegDataArray);
    85 	launcher.NotifyNewAppsL(emptyAppRegDataArray);
    86 	CleanupStack::PopAndDestroy(&launcher);
    86 	CleanupStack::PopAndDestroy(&launcher);
    87 	}
    87 	}
    88 
    88 
    89 #endif
    89 #endif
   538 
   538 
   539             CleanupClosePushL(secSettingsSession);
   539             CleanupClosePushL(secSettingsSession);
   540 	             
   540 	             
   541             // Read-in the values of the settings - KAllowSelfSignedInstallKey. 
   541             // Read-in the values of the settings - KAllowSelfSignedInstallKey. 
   542             // These will retain the default values if any error occurs.
   542             // These will retain the default values if any error occurs.
   543 
       
   544 	        TRAPD(err, (allowSelfSigned = secSettingsSession.SettingValueL(KUidInstallationRepository , KAllowSelfSignedInstallKey)));
   543 	        TRAPD(err, (allowSelfSigned = secSettingsSession.SettingValueL(KUidInstallationRepository , KAllowSelfSignedInstallKey)));
   545 
   544             if (err == KErrNone || err == KErrSettingNotFound || err == KErrNotFound || err == KErrCorrupt)
   546 	        if( err == KErrNone || err == KErrSettingNotFound || err == KErrNotFound || err == KErrCorrupt)
   545                 {
   547 				{
   546                 if (err == KErrCorrupt)
   548                  if (err == KErrCorrupt)
   547                     {
   549 	                {
   548                     DEBUG_PRINTF(_L8("Install Machine - CenRep file 2002cff6.txt is corrupt. Using Default Value to Install."));
   550                          DEBUG_PRINTF(_L8("Install Machine - CenRep file 2002cff6.txt is corrupt. Using Default Value to Install."));
   549                     }
   551 	                }
   550                 
   552 				                  
   551                 if (!allowSelfSigned || !SecurityAlertL(ETrue))
   553 	             if (!allowSelfSigned || !SecurityAlertL(ETrue))
   552                     {
   554 					{
   553                     User::Leave(KErrCancel);
   555 	                 User::Leave(KErrCancel);
   554                     }
   556 					}
   555                 }
   557 				}
   556             else
   558 	        else
   557                 {
   559 				{
   558                 User::Leave(err);
   560 	              User::Leave(err);
   559                 }
   561 				}
       
   562             CleanupStack::PopAndDestroy(&secSettingsSession);    	         			
   560             CleanupStack::PopAndDestroy(&secSettingsSession);    	         			
   563 			break;
   561 			break;
   564 		    }		   
   562 		    }		   
   565         case ECertificateValidationError:
   563         case ECertificateValidationError:
   566 		case ENoCertificate:
   564 		case ENoCertificate:
   630 		//Only warn once
   628 		//Only warn once
   631 		iInstallMachine.iSecurityManager->SetDevCertWarningState(EDevCertsWarned);	
   629 		iInstallMachine.iSecurityManager->SetDevCertWarningState(EDevCertsWarned);	
   632 		}		
   630 		}		
   633 		
   631 		
   634 	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   632 	#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   635 	// Forcibly skip the OCSP check and directly go to the prerequisites checking state when the 
   633 	// Forcibly skip the OCSP & prerequisites checking and directly go to the plan installation state when the 
   636 	// machine runs in component information collection mode. OCSP would introduce latency which is not expected when retrieving component info
   634 	// machine runs in component information collection mode. OCSP would introduce latency which is not expected 
       
   635 	// when retrieving component info.
   637 	if(iInstallMachine.IsInInfoMode())
   636 	if(iInstallMachine.IsInInfoMode())
   638 		{	
   637 		{	
   639 		return static_cast<TState*>(&iInstallMachine.iCheckPrerequisitesState);
   638 		return static_cast<TState*>(&iInstallMachine.iPlanInstallationState);
   640 		}
   639 		}
   641 	#endif
   640 	#endif
   642 
   641 
   643 	return static_cast<TState*>(&iInstallMachine.iOcspState);
   642 	return static_cast<TState*>(&iInstallMachine.iOcspState);
   644 	}
   643 	}
  1426 			DEBUG_PRINTF(_L8("Attempting to access (possibly) DRM'd SIS file via CAF"));
  1425 			DEBUG_PRINTF(_L8("Attempting to access (possibly) DRM'd SIS file via CAF"));
  1427 			iInstallMachine.iSisHelper.ExecuteDrmIntentL(static_cast<ContentAccess::TIntent>(iInstallMachine.iSecurityManager->SecurityPolicy().DrmIntent()));
  1426 			iInstallMachine.iSisHelper.ExecuteDrmIntentL(static_cast<ContentAccess::TIntent>(iInstallMachine.iSecurityManager->SecurityPolicy().DrmIntent()));
  1428 			}
  1427 			}
  1429 		}
  1428 		}
  1430 	
  1429 	
  1431 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
  1432 	DeRegisterForceRegisteredAppsL();
       
  1433 #endif
       
  1434 
       
  1435     iInstallMachine.CompleteSelf();
  1430     iInstallMachine.CompleteSelf();
  1436 	iInstallMachine.SetActive();
  1431 	iInstallMachine.SetActive();
  1437 	}
  1432 	}
  1438     
  1433     
  1439 CInstallMachine::TState* CInstallMachine::TFinalState::CompleteL()
  1434 CInstallMachine::TState* CInstallMachine::TFinalState::CompleteL()