Tizen 2.1 base
[platform/framework/web/wrt-installer.git] / src / jobs / widget_install / wac_security.cpp
index b8ce123..6dafd02 100644 (file)
@@ -27,10 +27,16 @@ namespace Jobs {
 namespace WidgetInstall {
 
 void WacSecurity::getCertificateChainList(
-        WrtDB::CertificateChainList& list) const
+        WrtDB::CertificateChainList& list,
+        WrtDB::CertificateSource source) const
 {
-    FOREACH(certIter,mCertificateChainList)
-        list.push_back(certIter->toBase64String());
+    if (source == WrtDB::CertificateSource::SIGNATURE_DISTRIBUTOR){
+        FOREACH(certIter, mCertificateChainList)
+            list.push_back(certIter->toBase64String());
+    } else {
+        FOREACH(certIter, mAuthorsCertificateChainList)
+            list.push_back(certIter->toBase64String());
+    }
 }
 
 } // namespace WidgetInstall