omadrm/drmengine/keystorage/src/DrmStdKeyStorage.cpp
branchRCL_3
changeset 26 1221b68b8a5f
parent 16 457cd4423b8c
child 27 1481bf457703
equal deleted inserted replaced
25:50c53e893c3f 26:1221b68b8a5f
    23 #include <hash.h>
    23 #include <hash.h>
    24 #include <asn1dec.h>
    24 #include <asn1dec.h>
    25 #include <x509cert.h>
    25 #include <x509cert.h>
    26 #include <etelmm.h>
    26 #include <etelmm.h>
    27 #include <mmtsy_names.h>
    27 #include <mmtsy_names.h>
    28 #include <featmgr.h>
       
    29 
    28 
    30 #ifdef RD_MULTIPLE_DRIVE
    29 #ifdef RD_MULTIPLE_DRIVE
    31 #include <driveinfo.h>
    30 #include <driveinfo.h>
    32 #endif
    31 #endif
    33 
    32 
   209 
   208 
   210     LOG(_L("CDrmStdKeyStorage::ConstructL ->"));
   209     LOG(_L("CDrmStdKeyStorage::ConstructL ->"));
   211     User::LeaveIfError(iFs.Connect());
   210     User::LeaveIfError(iFs.Connect());
   212     iFileMan = CFileMan::NewL(iFs);
   211     iFileMan = CFileMan::NewL(iFs);
   213 
   212 
   214     FeatureManager::InitializeLibL();
   213 #ifdef __DRM_OMA2
   215     
   214     TRAP_IGNORE( SelectDefaultRootL() ); // Allow startup anyway.
   216 #ifdef __DRM_OMA2 
   215 #endif
   217     if ( FeatureManager::FeatureSupported( KFeatureIdFfOmadrm2Support ) )
   216 
   218         {
       
   219         TRAP_IGNORE( SelectDefaultRootL() );
       
   220         }
       
   221 #endif
       
   222     
       
   223     FeatureManager::UnInitializeLib();
       
   224     
       
   225     iDeviceSpecificKey.Copy(KDefaultKey);
   217     iDeviceSpecificKey.Copy(KDefaultKey);
   226 
   218 
   227     LOG(_L("CDrmStdKeyStorage::ConstructL <-"));
   219     LOG(_L("CDrmStdKeyStorage::ConstructL <-"));
   228     }
   220     }
   229 
   221 
   582     iFs.GetDir(KSingingCertPattern, KEntryAttNormal, ESortByName, dir);
   574     iFs.GetDir(KSingingCertPattern, KEntryAttNormal, ESortByName, dir);
   583     CleanupStack::PushL(dir);
   575     CleanupStack::PushL(dir);
   584     for (i = 0; i < dir->Count(); i++)
   576     for (i = 0; i < dir->Count(); i++)
   585         {
   577         {
   586         ReadFileL(iFs, (*dir)[i].iName, cert);
   578         ReadFileL(iFs, (*dir)[i].iName, cert);
       
   579         CleanupStack::PushL( cert );
   587         aCertChain.AppendL(cert);
   580         aCertChain.AppendL(cert);
       
   581         CleanupStack::Pop( cert );
   588         }
   582         }
   589     CleanupStack::PopAndDestroy(); // dir
   583     CleanupStack::PopAndDestroy(); // dir
   590     LOG(_L("CDrmStdKeyStorage::GetCertificateChainL <-"));
   584     LOG(_L("CDrmStdKeyStorage::GetCertificateChainL <-"));
   591     }
   585     }
   592 
   586