clean cert about wac
authorSoyoung Kim <sy037.kim@samsung.com>
Thu, 4 Apr 2013 02:36:15 +0000 (11:36 +0900)
committerSoyoung Kim <sy037.kim@samsung.com>
Thu, 4 Apr 2013 02:37:32 +0000 (11:37 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] remove unused code about wac.
[SCMRequest] N/A

Change-Id: I09684ecb45af7e26919639004423eb38b3bf619a

src/jobs/widget_install/job_widget_install.cpp
src/jobs/widget_install/task_certify.cpp
src/jobs/widget_install/wac_security.h

index c311d8c..ec95960 100644 (file)
@@ -897,7 +897,6 @@ void JobWidgetInstall::displayWidgetInfo()
     localizedInfo.description;
     out << std::endl << "Widget Id:                   " << dao.getGUID();
     out << std::endl << "Widget recognized:           " << dao.isRecognized();
-    out << std::endl << "Widget wac signed:           " << dao.isWacSigned();
     out << std::endl << "Widget distributor signed:   " <<
     dao.isDistributorSigned();
     out << std::endl << "Widget trusted:              " << dao.isTrusted();
index 8670d01..32007ab 100644 (file)
@@ -40,7 +40,6 @@
 #include <vcore/SignatureReader.h>
 #include <vcore/SignatureFinder.h>
 #include <vcore/WrtSignatureValidator.h>
-#include <vcore/DeveloperModeValidator.h>
 #include <dpl/utils/wrt_global_settings.h>
 #include <dpl/wrt-dao-ro/global_dao_read_only.h>
 
@@ -155,10 +154,6 @@ void TaskCertify::processDistributorSignature(const SignatureData &data)
     // no point in check domain WAC_ROOT and WAC_RECOGNIZED
     m_contextData.wacSecurity.setDistributorSigned(true);
 
-    if (data.getStorageType().contains(CertStoreId::WAC_ROOT)) {
-        m_contextData.wacSecurity.setWacSigned(true);
-    }
-
     CertificateCollection collection;
     collection.load(data.getCertList());
     Assert(collection.sort() &&
@@ -241,8 +236,6 @@ void TaskCertify::stepSignature()
     SignatureFileInfoSet::reverse_iterator iter = signatureFiles.rbegin();
     LogInfo("Number of signatures: " << signatureFiles.size());
 
-    bool testCertificate = false;
-
     bool complianceMode = GlobalDAOReadOnly::getComplianceMode();
 
     for (; iter != signatureFiles.rend(); ++iter) {
@@ -315,49 +308,11 @@ void TaskCertify::stepSignature()
                 processDistributorSignature(data);
             }
 
-            bool developerMode = GlobalDAOReadOnly::GetDeveloperMode();
-
-            std::string realMEID;
-            /*
-            TapiHandle *tapiHandle = tel_init(NULL);
-            char *meid = tel_get_misc_me_sn_sync(tapiHandle);
-            if (meid) {
-                realMEID = meid;
-                free(meid);
-            }
-            tel_deinit(tapiHandle);
-            */
-
-            DeveloperModeValidator developerModeValidator(
-                complianceMode,
-                developerMode,
-                GlobalDAOReadOnly::getComplianceFakeImei(),
-                GlobalDAOReadOnly::getComplianceFakeMeid(),
-                realMEID);
-
-            developerModeValidator.check(data);
-
-            testCertificate |=
-                data.getStorageType().contains(CertStoreId::DEVELOPER);
-
-            if (testCertificate && !developerMode) {
-                LogError("Widget signed by test certificate, "
-                         "but developer mode is off.");
-                ThrowMsg(Exceptions::InvalidPackage,
-                         "Widget signed by test certificate, "
-                         "but developer mode is off.");
-            }
-            m_contextData.widgetConfig.isTestWidget = testCertificate;
         } Catch(ParserSchemaException::Base) {
             LogError("Error occured in ParserSchema.");
             ReThrowMsg(Exceptions::InvalidPackage,
                        "Error occured in ParserSchema.");
         }
-        Catch(DeveloperModeValidator::Exception::Base) {
-            LogError("Cannot validate developer certificate.");
-            ReThrowMsg(Exceptions::InvalidPackage,
-                       "Cannot validate developer certificate.");
-        }
     }
 
     if (signatureFiles.empty()) {
index d343fd9..8306f75 100644 (file)
@@ -34,8 +34,7 @@ class WacSecurity : public WrtDB::IWacSecurity
   public:
     WacSecurity() :
         mRecognized(false),
-        mDistributorSigned(false),
-        mWacSigned(false)
+        mDistributorSigned(false)
     {}
 
     // from IWacSecurity
@@ -54,9 +53,10 @@ class WacSecurity : public WrtDB::IWacSecurity
         return mDistributorSigned;
     }
 
+    // TODO : remove after wrt-commons released
     virtual bool isWacSigned() const
     {
-        return mWacSigned;
+        return false;
     }
 
     virtual void getCertificateChainList(
@@ -71,10 +71,6 @@ class WacSecurity : public WrtDB::IWacSecurity
     {
         mDistributorSigned = distributorSigned;
     }
-    void setWacSigned(bool wacSigned)
-    {
-        mWacSigned = wacSigned;
-    }
     void setAuthorCertificatePtr(ValidationCore::CertificatePtr certPtr)
     {
         mAuthorCertificate = certPtr;
@@ -108,8 +104,6 @@ class WacSecurity : public WrtDB::IWacSecurity
     bool mRecognized;
     // known distribuor
     bool mDistributorSigned;
-    // distributor is wac
-    bool mWacSigned;
     // Author end entity certificate.
     // Information from this certificate are shown to user
     // during installation process.