Remove boost dependency
[platform/core/appfw/app-installers.git] / src / common / certificate_validation.h
index de5db7f..1035e30 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef COMMON_CERTIFICATE_VALIDATION_H_
 #define COMMON_CERTIFICATE_VALIDATION_H_
 
-#include <boost/filesystem/path.hpp>
 #include <privilege_manager.h>
 #include <sys/types.h>
 #include <vcore/SignatureData.h>
@@ -23,17 +22,17 @@ common_installer::PrivilegeLevel CertStoreIdToPrivilegeLevel(
 privilege_manager_visibility_e PrivilegeLevelToVisibility(
     common_installer::PrivilegeLevel level);
 
-void SetPrivilegeLevel(ValidationCore::SignatureData data,
+void SetPrivilegeLevel(const ValidationCore::SignatureData& data,
     common_installer::PrivilegeLevel* level);
 
 bool ValidateSignatureFile(
-    const boost::filesystem::path& base_path,
+    const std::filesystem::path& base_path,
     const ValidationCore::SignatureFileInfo& file_info,
     common_installer::PrivilegeLevel* level,
     common_installer::CertificateInfo* cert_info,
     bool check_reference, std::string* error_message);
 
-bool ValidateSignatures(const boost::filesystem::path& base_path,
+bool ValidateSignatures(const std::filesystem::path& base_path,
     PrivilegeLevel* level, common_installer::CertificateInfo* cert_info,
     bool check_reference, std::string* error_message);
 
@@ -41,7 +40,9 @@ bool ValidatePrivilegeLevel(common_installer::PrivilegeLevel level,
     uid_t uid, const char* api_version, GList* privileges,
     std::string* error_message);
 
-bool CheckPrivLevelFromFile(const std::string& pkgid, PrivilegeLevel* level);
+bool GetSignatureFromFile(const std::string& pkgid,
+    bool is_readonly_package, PrivilegeLevel* level,
+    common_installer::CertificateInfo* cert_info);
 
 bool ValidateMetadataPrivilege(common_installer::PrivilegeLevel level,
     const char* api_version, GList* metadata_list,