Remove unused parameter 09/90009/3 accepted/tizen/common/20160928.163808 accepted/tizen/ivi/20160929.080906 accepted/tizen/mobile/20160929.080815 accepted/tizen/tv/20160929.080849 accepted/tizen/wearable/20160929.080837 submit/tizen/20160928.040222
authorJunghyun Yeon <jungh.yeon@samsung.com>
Wed, 28 Sep 2016 04:52:26 +0000 (13:52 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Wed, 28 Sep 2016 07:27:35 +0000 (00:27 -0700)
Change-Id: If497955cbd55ed8b7b09835dca4d5f9d242e55c6
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/common/certificate_validation.cc
src/common/certificate_validation.h
src/common/step/security/step_check_signature.cc
src/common/step/security/step_check_signature.h
src/common/step/security/step_recover_signature.cc
src/unit_tests/signature_unittest.cc

index e94d61d..9e1864a 100644 (file)
@@ -191,7 +191,7 @@ bool CheckDistSignature(const ValidationCore::SignatureFileInfo& file_info) {
 
 bool ValidateSignatures(const bf::path& base_path,
     PrivilegeLevel* level, common_installer::CertificateInfo* cert_info,
-    bool check_reference, bool is_preload, std::string* error_message) {
+    bool check_reference, std::string* error_message) {
   // Find signature files
   ValidationCore::SignatureFileInfoSet signature_files;
   ValidationCore::SignatureFinder signature_finder(base_path.string());
index fe34455..e257aa3 100644 (file)
@@ -34,7 +34,7 @@ bool ValidateSignatureFile(
 
 bool ValidateSignatures(const boost::filesystem::path& base_path,
     PrivilegeLevel* level, common_installer::CertificateInfo* cert_info,
-    bool check_reference, bool is_preload, std::string* error_message);
+    bool check_reference, std::string* error_message);
 
 bool ValidatePrivilegeLevel(common_installer::PrivilegeLevel level,
     const std::string& app_type, const char* api_version, GList* privileges,
index 9e2b3f8..ecd9c83 100644 (file)
@@ -57,12 +57,11 @@ boost::filesystem::path StepCheckSignature::GetSignatureRoot() const {
 }
 
 Step::Status StepCheckSignature::CheckSignatures(bool check_reference,
-                                                 bool is_preload,
                                                  PrivilegeLevel* level) {
   std::string error_message;
   if (!ValidateSignatures(GetSignatureRoot(), level,
                          &context_->certificate_info.get(), check_reference,
-                         is_preload, &error_message)) {
+                         &error_message)) {
     on_error(Status::CERT_ERROR, error_message);
     return Status::CERT_ERROR;
   }
@@ -110,7 +109,7 @@ Step::Status StepCheckSignature::process() {
       context_->request_type.get() == ci::RequestType::ManifestDirectUpdate)))
     check_reference = false;
   bool is_preload = context_->is_preload_request.get();
-  Status status = CheckSignatures(check_reference, is_preload, &level);
+  Status status = CheckSignatures(check_reference, &level);
   if (status != Status::OK)
     return status;
 
index 539b049..7d5ef52 100644 (file)
@@ -48,8 +48,7 @@ class StepCheckSignature : public Step {
   virtual Status CheckPrivilegeLevel(PrivilegeLevel level);
 
  private:
-  Status CheckSignatures(bool check_reference, bool is_preload,
-                         PrivilegeLevel* level);
+  Status CheckSignatures(bool check_reference, PrivilegeLevel* level);
   Status CheckSignatureMismatch();
 
   STEP_NAME(Signature)
index ce47815..deecdb5 100644 (file)
@@ -16,7 +16,7 @@ Step::Status StepRecoverSignature::RecoveryUpdate() {
   PrivilegeLevel level;
   if (!ValidateSignatures(GetSignatureRoot(), &level,
                          &context_->certificate_info.get(), false,
-                         false, &error_message)) {
+                         &error_message)) {
     LOG(ERROR) << "Failed to verify signature: " << error_message;
     return Status::CERT_ERROR;
   }
index 6594af2..c804db8 100644 (file)
@@ -27,7 +27,7 @@ TEST_F(SignatureValidatorTest, HandlesInitializedSignatureDir) {
   common_installer::CertificateInfo cert_info;
   std::string error;
   EXPECT_TRUE(ValidateSignatures(*signature_file, &level, &cert_info, true,
-                                 false, &error));
+                                 &error));
 }
 
 // Tests signature verifier with signature directory containing bad signatures
@@ -38,7 +38,7 @@ TEST_F(SignatureValidatorTest, HandlesBadSignatureDir) {
   common_installer::CertificateInfo cert_info;
   std::string error;
   EXPECT_FALSE(ValidateSignatures(*signature_file, &level, &cert_info, true,
-                                  false, &error));
+                                  &error));
 }
 
 }  // namespace security