#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>
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);
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,