ADD_SUBDIRECTORY(etc)
IF (DEFINED CERTSVC_TEST_BUILD)
-ADD_DEFINITIONS("-DTESTAPP_RES_DIR=\"${TZ_SYS_RO_APP}/widget/tests/\"")
+ADD_DEFINITIONS("-DTESTAPP_RES_DIR=\"${TZ_SYS_RO_APP}/cert-svc-tests/\"")
ADD_SUBDIRECTORY(tests)
ENDIF (DEFINED CERTSVC_TEST_BUILD)
Group: Security/Testing
Requires: ca-certificates-tizen
Requires: %{name} = %{version}-%{release}
-Conflicts: %name
%description test
Certification service (tests)
%if 0%{?certsvc_test_build}
%files test
%TZ_SYS_BIN/cert-svc-test*
-%TZ_SYS_RO_APP/widget/tests
-%TZ_SYS_SHARE/cert-svc/cert-type
-%TZ_SYS_SHARE/cert-svc/tests
+%TZ_SYS_RO_APP/cert-svc-tests
%TZ_SYS_SHARE/ca-certificates/tizen/root_cacert0.pem
%_libdir/libcert-svc-validator-plugin.so
%endif
INSTALL(FILES
${CERT_SVC_CAPI_TESTS_DIR}/data/root_cacert0.pem
- ${CERT_SVC_CAPI_TESTS_DIR}/data/root_ca_cert.pem
- ${CERT_SVC_CAPI_TESTS_DIR}/data/second_ca_cert.pem
- DESTINATION ${TZ_SYS_SHARE}/cert-svc/cert-type/
+ DESTINATION ${TZ_SYS_RO_APP}/cert-svc-tests/certs
PERMISSIONS OWNER_READ
GROUP_READ
WORLD_READ
#include "common-res.h"
+const std::string TestData::SelfSignedCAPath = std::string(TESTAPP_RES_DIR) + "certs/root_cacert0.pem";
const std::string TestData::subjectGoogleCA = "/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority";
const std::string TestData::googleCA =
std::string signature;
};
+extern const std::string SelfSignedCAPath;
+
extern const std::string subjectGoogleCA;
/*
* Not Before: Jan 29 00:00:00 1996 GMT
+++ /dev/null
------BEGIN CERTIFICATE-----
-MIIC/jCCAmegAwIBAgIJAOifQRE/qMjWMA0GCSqGSIb3DQEBCwUAMIGXMQswCQYD
-VQQGEwJLTzETMBEGA1U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kGA1UEBhMC
-S08xEzARBgNVBAgMCkt5ZW9uZ2tpZG8xDjAMBgNVBAcMBVN1d29uMRAwDgYDVQQK
-DAdTYW1zdW5nMRcwFQYDVQQLDA5Tb2Z0d2FyZUNlbnRlcjEWMBQGA1UEAwwNVGl6
-ZW5TZWN1cml0eTEgMB4GCSqGSIb3DQEJARYRay50YWtAc2Ftc3VuZy5jb20wHhcN
-MTUwODE5MDQzNTQxWhcNMjAwODE3MDQzNTQxWjCBrzELMAkGA1UEBhMCUE8xEzAR
-BgNVBAgMClNlb3VsU3RhdGUxDjAMBgNVBAcMBVNlb3VsMRYwFAYDVQQKDA1TYW1z
-dW5nU2Vjb25kMR0wGwYDVQQLDBRTb2Z0d2FyZUNlbnRlclNlY29uZDEcMBoGA1UE
-AwwTVGl6ZW5TZWN1cml0eVNlY29uZDEmMCQGCSqGSIb3DQEJARYXa3l1bmd3b29r
-LnRha0BnbWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANgIo6MF
-++LfNs3jSC87WRfO4zK/n+/xfPsn+Xwyi4jtsMxk2v/ye/SGESAACdCFFBL/EZ9j
-Adu/6kzuKDJ5SpphW++XoUM2YdNxHzf6+z8JK9IPVmhy3b/hQlVbtBiFAMuLOn1D
-C0gfTEnYRgZBs3v5Z/N35ZO1FoCz8y9wHmAXAgMBAAEwDQYJKoZIhvcNAQELBQAD
-gYEAb3/k6KLLGysGEMFk2rVVvroqGqzeKHfk+t/pbrdGHEr0EIIXIYBk7YCGhMVF
-Flw7g6Cpxyo1FQEFQhcdiv4/Iio2/RemtTYRILOnoaHSh9j9Fl1LT69MZq20hjId
-8WNW2Ah9APv29fpZQFXo8dMsy1cnh4hJhWVWWttSLUBd1uE=
------END CERTIFICATE-----
CertSvcCertificate cert;
int result = certsvc_certificate_new_from_file(
vinstance,
- "/usr/share/cert-svc/cert-type/root_cacert0.pem",
+ TestData::SelfSignedCAPath.c_str(),
&cert);
RUNNER_ASSERT_MSG(CERTSVC_TRUE == result, "Error reading certificate");
#
SET(PKCS12_TEST_SOURCES
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/pkcs12_test.cpp
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/new_test_cases.cpp
+ pkcs12_test.cpp
+ new_test_cases.cpp
+ test-common.cpp
)
INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/vcore/src
- ${PROJECT_SOURCE_DIR}/tests/pkcs12
+ .
)
ADD_EXECUTABLE(${TARGET_PKCS12_TEST} ${PKCS12_TEST_SOURCES} ${DPL_TEST_SOURCES})
WORLD_EXECUTE
)
-
-INSTALL(FILES
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/without_pass.p12
- DESTINATION ${TZ_SYS_RO_APP}/widget/tests/pkcs12/
-)
-
-INSTALL(FILES
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/without_pass.p12
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/Invalidcrt.crt
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/Testing.crt
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/test.pfx
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/wifi-server.pem
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/wifiserver.pfx
- ${PROJECT_SOURCE_DIR}/tests/pkcs12/wifiuser.p12
- DESTINATION ${TZ_SYS_SHARE}/cert-svc/tests/
+INSTALL(
+ FILES
+ without_pass.p12
+ Invalidcrt.crt
+ Testing.crt
+ test.pfx
+ wifi-server.pem
+ wifiserver.pfx
+ wifiuser.p12
+ DESTINATION ${TZ_SYS_RO_APP}/cert-svc-tests/p12
)
#include <dpl/test/test_runner.h>
+#include "test-common.h"
+
static CertSvcInstance instance;
static CertSvcString wrapper_certsvc_string_new(const char *cStr)
CREATE_INSTANCE
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifi-server.pem");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerCertPemPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new(NULL);
CertSvcString Alias = wrapper_certsvc_string_new("PEM-wifi-server-1");
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("PEM-wifi-server-all-store");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifi-server.pem");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerCertPemPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new(NULL);
result = certsvc_pkcs12_import_from_file_to_store(instance, allStoreType, Path, Pass, Alias);
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("CRT-TestingCRT1");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/Testing.crt");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::CertCrtPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new(NULL);
result = certsvc_pkcs12_import_from_file_to_store(instance, WIFI_STORE, Path, Pass, Alias);
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("CRT-TestingCRT1-all-store");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/Testing.crt");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::CertCrtPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new(NULL);
result = certsvc_pkcs12_import_from_file_to_store(instance, allStoreType, Path, Pass, Alias);
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("P12-WifiUser-all-store");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifiuser.p12");
- CertSvcString Pass = wrapper_certsvc_string_new("wifi");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::UserP12WithPassPath.c_str());
+ CertSvcString Pass = wrapper_certsvc_string_new(TestData::UserP12Pass.c_str());
result = certsvc_pkcs12_import_from_file_to_store(instance, allStoreType, Path, Pass, Alias);
RUNNER_ASSERT_MSG(result == CERTSVC_SUCCESS, "Importing p12 file to WIFI store failed.");
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("PFX-WifiServer");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifiserver.pfx");
- CertSvcString Pass = wrapper_certsvc_string_new("wifi");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerPfxWithPassPath.c_str());
+ CertSvcString Pass = wrapper_certsvc_string_new(TestData::ServerPfxPass.c_str());
result = certsvc_pkcs12_import_from_file_to_store(instance, WIFI_STORE, Path, Pass, Alias);
RUNNER_ASSERT_MSG(result == CERTSVC_SUCCESS, "Importing PFX file to WIFI store failed.");
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("PFX-WifiServer-all-store");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifiserver.pfx");
- CertSvcString Pass = wrapper_certsvc_string_new("wifi");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerPfxWithPassPath.c_str());
+ CertSvcString Pass = wrapper_certsvc_string_new(TestData::ServerPfxPass.c_str());
result = certsvc_pkcs12_import_from_file_to_store(instance, allStoreType, Path, Pass, Alias);
RUNNER_ASSERT_MSG(result == CERTSVC_SUCCESS, "Importing PFX file to WIFI store failed.");
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("PFX-WifiServer-one-store");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifiserver.pfx");
- CertSvcString Pass = wrapper_certsvc_string_new("wifi");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerPfxWithPassPath.c_str());
+ CertSvcString Pass = wrapper_certsvc_string_new(TestData::ServerPfxPass.c_str());
int isUnique = 0;
result = certsvc_pkcs12_check_alias_exists_in_store(instance, allStoreType, Alias, &isUnique);
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("PFX-WifiServer-without-password");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/without_pass.p12");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerPfxWithoutPassPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new("");
int isUnique = 0;
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("PFX-WifiServer-one-store");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/wifi-server.pem");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerCertPemPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new(NULL);
result = certsvc_pkcs12_import_from_file_to_store(instance, (CertStoreType)-1, Path, Pass, Alias);
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("TestingCRT1");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/Invalidcrt.crt");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::InvalidCertCrtPath.c_str());
CertSvcString Pass = wrapper_certsvc_string_new(NULL);
result = certsvc_pkcs12_import_from_file_to_store(instance, WIFI_STORE, Path, Pass, Alias);
CREATE_INSTANCE
CertSvcString Alias = wrapper_certsvc_string_new("WifiServer-123");
- CertSvcString Path = wrapper_certsvc_string_new("/usr/share/cert-svc/tests/test.pfx");
- CertSvcString Pass = wrapper_certsvc_string_new("wifi");
+ CertSvcString Path = wrapper_certsvc_string_new(TestData::ServerPfxWithPass2Path.c_str());
+ CertSvcString Pass = wrapper_certsvc_string_new(TestData::ServerPfx2Pass.c_str());
result = certsvc_pkcs12_import_from_file_to_store(instance, SYSTEM_STORE, Path, Pass, Alias);
RUNNER_ASSERT_MSG(result != CERTSVC_SUCCESS, "Importing invalid PFX file should be failed.");
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "test-common.h"
+
+namespace TestData {
+
+const std::string ServerPfxWithPassPath = std::string(TESTAPP_RES_DIR) + "p12/wifiserver.pfx";
+const std::string ServerPfxWithPass2Path = std::string(TESTAPP_RES_DIR) + "p12/test.pfx";
+const std::string ServerPfxWithoutPassPath = std::string(TESTAPP_RES_DIR) + "p12/without_pass.p12";
+const std::string UserP12WithPassPath = std::string(TESTAPP_RES_DIR) + "p12/wifiuser.p12";
+const std::string ServerCertPemPath = std::string(TESTAPP_RES_DIR) + "p12/wifi-server.pem";
+const std::string CertCrtPath = std::string(TESTAPP_RES_DIR) + "p12/Testing.crt";
+const std::string InvalidCertCrtPath = std::string(TESTAPP_RES_DIR) + "p12/InvalidCrt.crt";
+const std::string ServerPfxPass = "wifi";
+const std::string ServerPfx2Pass = "wifi";
+const std::string UserP12Pass = "wifi";
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include <string>
+
+namespace TestData {
+
+extern const std::string ServerPfxWithPassPath;
+extern const std::string ServerPfxWithPass2Path;
+extern const std::string ServerPfxWithoutPassPath;
+extern const std::string UserP12WithPassPath;
+extern const std::string ServerCertPemPath;
+extern const std::string CertCrtPath;
+extern const std::string InvalidCertCrtPath;
+
+extern const std::string ServerPfxPass;
+extern const std::string ServerPfx2Pass;
+extern const std::string UserP12Pass;
+
+}
# @version 1.0
# @brief
#
-SET(CERT_SVC_VCORE_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-
SET(VCORE_TESTS_SOURCES
- ${CERT_SVC_VCORE_TESTS_DIR}/main.cpp
- ${CERT_SVC_VCORE_TESTS_DIR}/test-common.cpp
- ${CERT_SVC_VCORE_TESTS_DIR}/test-signature-validator.cpp
- ${CERT_SVC_VCORE_TESTS_DIR}/test-ocsp-check.cpp
- ${CERT_SVC_VCORE_TESTS_DIR}/test-time-conversion.cpp
+ main.cpp
+ test-common.cpp
+ test-signature-validator.cpp
+ test-certificate.cpp
+ test-ocsp-check.cpp
+ test-time-conversion.cpp
)
INCLUDE_DIRECTORIES(
- ${CERT_SVC_VCORE_TESTS_DIR}
+ .
)
ADD_EXECUTABLE(${TARGET_VCORE_TEST}
)
INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget/author-signature.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget/signature1.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget/signature22.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget/config.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget/index.html
- DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/vcore_widget_uncompressed
- )
-
-INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_hash/author-signature.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_hash/signature1.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_hash/signature22.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_hash/config.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_hash/index.html
- DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/vcore_widget_uncompressed_negative_hash
- )
-
-INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_signature/author-signature.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_signature/signature1.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_signature/signature22.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_signature/config.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_signature/index.html
+ resource/root_cacert0.pem
DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/vcore_widget_uncompressed_negative_signature
- )
-
-INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_certificate/author-signature.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_certificate/signature1.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_certificate/config.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_negative_certificate/index.html
- DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/vcore_widget_uncompressed_negative_certificate
- )
-
-INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner/author-signature.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner/signature1.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner/config.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner/index.html
- DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/vcore_widget_uncompressed_partner
- )
-
-INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner_operator/author-signature.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner_operator/signature1.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner_operator/config.xml
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/widget_partner_operator/index.html
- DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/vcore_widget_uncompressed_partner_operator
+ ${TZ_SYS_SHARE}/ca-certificates/tizen
)
-INSTALL(FILES
- "${CERT_SVC_VCORE_TESTS_DIR}/test-cases/reference/encoding test.empty"
- DESTINATION
- ${TZ_SYS_RO_APP}/widget/tests/reference
- )
+INSTALL(
+ DIRECTORY
+ resource/wgt
+ resource/wgt_negative_hash
+ resource/wgt_negative_signature
+ resource/wgt_negative_certificate
+ resource/wgt_partner
+ resource/wgt_partner_operator
+ resource/tpk
+ resource/attacked-tpk
+ resource/tpk-with-userdata
+ resource/attacked-tpk-with-userdata
-INSTALL(FILES
- ${CERT_SVC_VCORE_TESTS_DIR}/test-cases/root_cacert0.pem
DESTINATION
- ${TZ_SYS_SHARE}/ca-certificates/tizen
+ ${TZ_SYS_RO_APP}/cert-svc-tests/apps
)
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+GJVkTe68bLdCB89jGKUovM3mk6oYen6MdWm66XRRERl3xdshPr4DpQ3ZA8ivaQArpTi435R4iy5W
+EAjiABBLdXwmsE8lBS5rEskwg0f74CgMxf1ePjwrZJORFMLvsSTKZxlSffDki4nju9liJTlx/ygv
+QJMe++8wdpWVArUkU1k=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIIDDzCCAfegAwIBAgIGAU9y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loiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+this is data1 created by user
--- /dev/null
+this is data2 created by user
--- /dev/null
+This is malfile. Reference of this file isn't in signature.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<res xmlns="http://tizen.org/ns/rm"/>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>kY0SZLvGVjky2n9CVdX04y8PDpOsO39mMaHxfgbSoJM=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYb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RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
+VhfnkHwPltmrpYVe
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.example.preference" version="1.0.0">
+ <profile name="mobile"/>
+ <ui-application appid="org.example.preference" exec="preference" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>preference</label>
+ <icon>preference.png</icon>
+ </ui-application>
+ <Unknown-tag-for-validator-test>
+ </Unknown-tag-for-validator-test>
+</manifest>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>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xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+This is malfile. Reference of this file isn't in signature.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<res xmlns="http://tizen.org/ns/rm"/>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>kY0SZLvGVjky2n9CVdX04y8PDpOsO39mMaHxfgbSoJM=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+DCb5J8PcmLarosBP+ARWh55qTTvpHgcJENT9IlvOyTFDk3d0oWd8gphCcRh2T5VivYlGPyxX4EDn
+CuWCeYU2yeO+Pa2a3TO/ILxO7cBWvi5aCsXcyvzEIX8tyZKAmn+hjil2V90/Gie+2oP/8ko0HjdO
+s2sMco+a/8+0+on5liI=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry
+aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS
+MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex
+IjAgBgNVBAsMGVRpemVuIERpc3RyaWJ1dG9yIFRlc3QgQ0ExKDAmBgNVBAMMH1RpemVuIFB1Ymxp
+YyBEaXN0cmlidXRvciBTaWduZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALtMvlc5hENK
+90ZdA+y66+Sy0enD1gpZDBh5T9RP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Cj4blGfuMDzd2ah
+2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ
+KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+
+yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
+VhfnkHwPltmrpYVe
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.example.preference" version="1.0.0">
+ <profile name="mobile"/>
+ <ui-application appid="org.example.preference" exec="preference" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>preference</label>
+ <icon>preference.png</icon>
+ </ui-application>
+</manifest>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+GJVkTe68bLdCB89jGKUovM3mk6oYen6MdWm66XRRERl3xdshPr4DpQ3ZA8ivaQArpTi435R4iy5W
+EAjiABBLdXwmsE8lBS5rEskwg0f74CgMxf1ePjwrZJORFMLvsSTKZxlSffDki4nju9liJTlx/ygv
+QJMe++8wdpWVArUkU1k=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIIDDzCCAfegAwIBAgIGAU9yZJfgMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMIGKMQswCQYDVQQGEwJL
+TzERMA8GA1UECAwIS3llb25nZ2kxDjAMBgNVBAcMBVN1d29uMRAwDgYDVQQKDAdTYW1zdW5nMQww
+CgYDVQQLDANTV0MxIDAeBgkqhkiG9w0BCQEWEWsudGFrQHNhbXN1bmcuY29tMRYwFAYDVQQDDA1U
+aXplblNlY3VyaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGXaKMxUFJbhFKawG0Yvoy
+q4bBhf/A53grBk3sYOqyyiINxleK7Z+GhZh3+w0s4OAsDd+pjtgg2tDmjv7XCY6QwYZwS+ImEtWP
+MKgPe0eR+QeM6wx0ybXDxf22u4CcAAahTEYT3rB7pzMsW10ZfvK4GChgh2ANQ+rKbh0auXx2dwID
+AQABozIwMDAMBgNVHRMBAf8EAjAAMAsGA1UdDwQEAwIHgDATBgNVHSUEDD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STKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+this is data1 created by user
--- /dev/null
+this is data2 created by user
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<res xmlns="http://tizen.org/ns/rm"/>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>kY0SZLvGVjky2n9CVdX04y8PDpOsO39mMaHxfgbSoJM=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+DCb5J8PcmLarosBP+ARWh55qTTvpHgcJENT9IlvOyTFDk3d0oWd8gphCcRh2T5VivYlGPyxX4EDn
+CuWCeYU2yeO+Pa2a3TO/ILxO7cBWvi5aCsXcyvzEIX8tyZKAmn+hjil2V90/Gie+2oP/8ko0HjdO
+s2sMco+a/8+0+on5liI=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry
+aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS
+MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex
+IjAgBgNVBAsM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qGSIb3DQEBAQUAA4GNADCBiQKBgQDe
+OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp
+bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah
+2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ
+KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+
+yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
+VhfnkHwPltmrpYVe
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.example.preference" version="1.0.0">
+ <profile name="mobile"/>
+ <ui-application appid="org.example.preference" exec="preference" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>preference</label>
+ <icon>preference.png</icon>
+ </ui-application>
+</manifest>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="AuthorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+GJVkTe68bLdCB89jGKUovM3mk6oYen6MdWm66XRRERl3xdshPr4DpQ3ZA8ivaQArpTi435R4iy5W
+EAjiABBLdXwmsE8lBS5rEskwg0f74CgMxf1ePjwrZJORFMLvsSTKZxlSffDki4nju9liJTlx/ygv
+QJMe++8wdpWVArUkU1k=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIIDDzCCAfegAwIBAgIGAU9yZJfgMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz
+c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2
+ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMIGKMQswCQYDVQQGEwJL
+TzERMA8GA1UECAwIS3llb25nZ2kxDjAMBgNVBAcMBVN1d29uMRAwDgYDVQQKDAdTYW1zdW5nMQww
+CgYDVQQLDANTV0MxIDAeBgkqhkiG9w0BCQEWEWsudGFrQHNhbXN1bmcuY29tMRYwFAYDVQQDDA1U
+aXplblNlY3VyaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCGXaKMxUFJbhFKawG0Yvoy
+q4bBhf/A53grBk3sYOqyyiINxleK7Z+GhZh3+w0s4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x1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj
+vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/
+jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE
+dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC
+AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH
+95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04
+1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M
++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI
+W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg==
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#AuthorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#AuthorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-author"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#AuthorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<res xmlns="http://tizen.org/ns/rm"/>
--- /dev/null
+<Signature xmlns="http://www.w3.org/2000/09/xmldsig#" Id="DistributorSignature">
+<SignedInfo>
+<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></CanonicalizationMethod>
+<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
+<Reference URI="author-signature.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>kY0SZLvGVjky2n9CVdX04y8PDpOsO39mMaHxfgbSoJM=</DigestValue>
+</Reference>
+<Reference URI="bin%2Fpreference">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>R+wCQjviLt63vWd7HajbrPSbJbbOZC93+RPHowIK1Rw=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_buttons_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>KNopf8O7zUvszi2oqj8P0SvEIJKTC1rP2xP6akdSKXI=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpref_edit_panel.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>6jJJe4p6k14qWfbsmuOE+hBiI8SFKo82oHe73dBShdo=</DigestValue>
+</Reference>
+<Reference URI="res%2Fedje%2Fpreference.edj">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>D1HJvj7+ZWJjqwg1kgncS2GmkcP86uScijC2PKhGeRU=</DigestValue>
+</Reference>
+<Reference URI="res%2Fimages%2Ficon_delete.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>SxJRm0cUVzrc/slDekjneWdmKHmwbQGd+x9oamqPvP8=</DigestValue>
+</Reference>
+<Reference URI="res%2Fres.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>2ZbyqC64RllT1GCNW5IIyp4vn8GswcvepAJJ/rY2HVk=</DigestValue>
+</Reference>
+<Reference URI="shared%2Fres%2Fpreference.png">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs=</DigestValue>
+</Reference>
+<Reference URI="tizen-manifest.xml">
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>/efF+N62cTq47hYqkQl5oCSNBBgzqfc30KbK97ikq48=</DigestValue>
+</Reference>
+<Reference URI="#prop">
+<Transforms>
+<Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"></Transform>
+</Transforms>
+<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
+<DigestValue>u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4=</DigestValue>
+</Reference>
+</SignedInfo>
+<SignatureValue>
+DCb5J8PcmLarosBP+ARWh55qTTvpHgcJENT9IlvOyTFDk3d0oWd8gphCcRh2T5VivYlGPyxX4EDn
+CuWCeYU2yeO+Pa2a3TO/ILxO7cBWvi5aCsXcyvzEIX8tyZKAmn+hjil2V90/Gie+2oP/8ko0HjdO
+s2sMco+a/8+0+on5liI=
+</SignatureValue>
+<KeyInfo>
+<X509Data>
+<X509Certificate>
+MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV
+BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE
+CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry
+aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXD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NVGl6
+ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwb
+VGl6ZW4gUHVibGljIERpc3RyaWJ1dG9yIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe
+OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp
+bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah
+2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ
+KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+
+yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0
+VhfnkHwPltmrpYVe
+</X509Certificate>
+</X509Data>
+</KeyInfo>
+<Object Id="prop"><SignatureProperties xmlns:dsp="http://www.w3.org/2009/xmldsig-properties"><SignatureProperty Id="profile" Target="#DistributorSignature"><dsp:Profile URI="http://www.w3.org/ns/widgets-digsig#profile"></dsp:Profile></SignatureProperty><SignatureProperty Id="role" Target="#DistributorSignature"><dsp:Role URI="http://www.w3.org/ns/widgets-digsig#role-distributor"></dsp:Role></SignatureProperty><SignatureProperty Id="identifier" Target="#DistributorSignature"><dsp:Identifier></dsp:Identifier></SignatureProperty></SignatureProperties></Object>
+</Signature>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.example.preference" version="1.0.0">
+ <profile name="mobile"/>
+ <ui-application appid="org.example.preference" exec="preference" multiple="false" nodisplay="false" taskmanage="true" type="capp">
+ <label>preference</label>
+ <icon>preference.png</icon>
+ </ui-application>
+</manifest>
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string>
+#include <dpl/test/test_runner.h>
+#include <vcore/Certificate.h>
+
+#include "test-common.h"
+
+using namespace ValidationCore;
+
+RUNNER_TEST_GROUP_INIT(T0030_Certificate)
+
+/*
+ * test: class Certificate
+ * description: Certificate should parse data passed to object constructor.
+ * expected: Getters should be able to return certificate information.
+ */
+RUNNER_TEST(T0031_Certificate)
+{
+ Certificate cert(TestData::certVerisign, Certificate::FORM_BASE64);
+ std::string result;
+
+ result = cert.getCommonName(Certificate::FIELD_SUBJECT);
+ RUNNER_ASSERT_MSG(!result.empty(), "No common name");
+ RUNNER_ASSERT_MSG(!result.compare("www.verisign.com"), "CommonName mismatch");
+
+ result = cert.getCommonName(Certificate::FIELD_ISSUER);
+ RUNNER_ASSERT_MSG(!result.empty(), "No common name");
+ RUNNER_ASSERT_MSG(!result.compare("VeriSign Class 3 Extended Validation SSL SGC CA"),
+ "CommonName mismatch");
+
+ result = cert.getCountryName();
+ RUNNER_ASSERT_MSG(!result.empty(), "No country");
+ RUNNER_ASSERT_MSG(!result.compare("US"), "Country mismatch");
+}
+
+/*
+ * test: Certificate::getFingerprint
+ * description: Certificate should parse data passed to object constructor.
+ * expected: Function fingerprint should return valid fingerprint.
+ */
+RUNNER_TEST(T0032_Certificate)
+{
+ Certificate cert(TestData::certVerisign, Certificate::FORM_BASE64);
+
+ Certificate::Fingerprint fin =
+ cert.getFingerprint(Certificate::FINGERPRINT_SHA1);
+
+ unsigned char buff[20] = {
+ 0xb9, 0x72, 0x1e, 0xd5, 0x49,
+ 0xed, 0xbf, 0x31, 0x84, 0xd8,
+ 0x27, 0x0c, 0xfe, 0x03, 0x11,
+ 0x19, 0xdf, 0xc2, 0x2b, 0x0a};
+ RUNNER_ASSERT_MSG(fin.size() == 20, "Wrong size of fingerprint");
+
+ for (size_t i = 0; i<20; ++i) {
+ RUNNER_ASSERT_MSG(fin[i] == buff[i], "Fingerprint mismatch");
+ }
+}
+
+/*
+ * test: Certificate::getAlternativeNameDNS
+ * description: Certificate should parse data passed to object constructor.
+ * expected: Function getAlternativeNameDNS should return list of
+ * alternativeNames hardcoded in certificate.
+ */
+RUNNER_TEST(T0033_Certificate)
+{
+ Certificate cert(TestData::certVerisign, Certificate::FORM_BASE64);
+
+ Certificate::AltNameSet nameSet = cert.getAlternativeNameDNS();
+
+ RUNNER_ASSERT(nameSet.size() == 8);
+
+ std::string str("verisign.com");
+ RUNNER_ASSERT(nameSet.find(str) != nameSet.end());
+
+ str = std::string("fake.com");
+ RUNNER_ASSERT(nameSet.find(str) == nameSet.end());
+
+}
+
+/*
+ * test: Certificate::isCA
+ * description: Certificate should parse data passed to object constructor.
+ * expected: 1st and 2nd certificate should be identified as CA.
+ */
+RUNNER_TEST(T0034_Certificate_isCA)
+{
+ Certificate cert1(TestData::googleCA, Certificate::FORM_BASE64);
+ RUNNER_ASSERT(cert1.isCA() > 0);
+
+ Certificate cert2(TestData::google2nd, Certificate::FORM_BASE64);
+ RUNNER_ASSERT(cert2.isCA() > 0);
+
+ Certificate cert3(TestData::google3rd, Certificate::FORM_BASE64);
+ RUNNER_ASSERT(cert3.isCA() == 0);
+}
#include "test-common.h"
-const std::string TestData::widget_path = std::string(TESTAPP_RES_DIR) + "vcore_widget_uncompressed/";
-const std::string TestData::widget_negative_hash_path = std::string(TESTAPP_RES_DIR) + "vcore_widget_uncompressed_negative_hash/";
-const std::string TestData::widget_negative_signature_path = std::string(TESTAPP_RES_DIR) + "vcore_widget_uncompressed_negative_signature/";
-const std::string TestData::widget_negative_certificate_path = std::string(TESTAPP_RES_DIR) + "vcore_widget_uncompressed_negative_certificate/";
-const std::string TestData::widget_partner_path = std::string(TESTAPP_RES_DIR) + "vcore_widget_uncompressed_partner/";
-const std::string TestData::widget_partner_operator_path = std::string(TESTAPP_RES_DIR) + "vcore_widget_uncompressed_partner_operator/";
+const std::string TestData::widget_path = std::string(TESTAPP_RES_DIR) + "apps/wgt";
+const std::string TestData::widget_negative_hash_path = std::string(TESTAPP_RES_DIR) + "apps/wgt_negative_hash";
+const std::string TestData::widget_negative_signature_path = std::string(TESTAPP_RES_DIR) + "apps/wgt_negative_signature";
+const std::string TestData::widget_negative_certificate_path = std::string(TESTAPP_RES_DIR) + "apps/wgt_negative_certificate";
+const std::string TestData::widget_partner_path = std::string(TESTAPP_RES_DIR) + "apps/wgt_partner";
+const std::string TestData::widget_partner_operator_path = std::string(TESTAPP_RES_DIR) + "apps/wgt_partner_operator";
+
+const std::string TestData::tpk_path = std::string(TESTAPP_RES_DIR) + "apps/tpk";
+const std::string TestData::attacked_tpk_path = std::string(TESTAPP_RES_DIR) + "apps/attacked-tpk";
+const std::string TestData::tpk_with_userdata_path = std::string(TESTAPP_RES_DIR) + "apps/tpk-with-userdata";
+const std::string TestData::attacked_tpk_with_userdata_path = std::string(TESTAPP_RES_DIR) + "apps/attacked-tpk-with-userdata";
const std::string TestData::certEE =
"MIIGXDCCBUSgAwIBAgIQKJK70TuBw91HAA0BqZSPETANBgkqhkiG9w0BAQsFADB3\n"
extern const std::string widget_partner_path;
extern const std::string widget_partner_operator_path;
+extern const std::string tpk_path;
+extern const std::string attacked_tpk_path;
+extern const std::string tpk_with_userdata_path;
+extern const std::string attacked_tpk_with_userdata_path;
+
extern const std::string certEE; /* MBANK, signed by SYMANTEC, expires 04 Feb 2016 */
extern const std::string certIM; /* SYMANTEC, signed by VERISIGN, expires 30 Oct 2023 */
extern const std::string certRoot; /* VERISIGN, signed by self, expires 30 Oct 2023 */
RUNNER_TEST_GROUP_INIT(T0010_SIGNATURE_VALIDATOR)
-/*
- * test: Class SignatureFinder
- * description: SignatureFinder should search directory passed as
- * param of constructor.
- * expected: Signature finder should put information about 3
- * signture files in SinatureFileInfoSet.
- */
-RUNNER_TEST(T0011_signature_finder)
+RUNNER_TEST(T00101_finder)
{
SignatureFileInfoSet signatureSet;
SignatureFinder signatureFinder(TestData::widget_path);
RUNNER_ASSERT_MSG(count == 3, "Wrong signature file count.");
}
-/*
- * test: Integration test of SignatureFinder, SignatureReader,
- * SignatureValidator
- * description: Directory passed to SignatureFinded constructor should be searched
- * and 3 signature should be find. All signature should be parsed and verified.
- * expected: Verificator should DISREGARD author signature and VERIFY
- * distrubutor signature.
- */
-RUNNER_TEST(T0012_signature_validator)
+RUNNER_TEST(T00102_positive_public_check_ref)
{
SignatureFileInfoSet signatureSet;
SignatureFinder signatureFinder(TestData::widget_path);
SignatureData data;
VCerr result = validator.check(
TestData::widget_path,
- false,
+ true,
true,
data);
if (data.isAuthorSignature())
RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Validation failed");
+ "author sig validation should be disregarded: "
+ << validator.errorToString(result));
else
if (data.getSignatureNumber() == 1)
RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Validation failed");
+ "dist1 sig validation should be disregarded: "
+ << validator.errorToString(result));
else
RUNNER_ASSERT_MSG(result == E_SIG_NONE,
- "Validation failed");
+ "dist22 sig validation should be success: "
+ << validator.errorToString(result));
}
}
-RUNNER_TEST(T00121_signature_validator_negative_hash_input)
+RUNNER_TEST(T00103_positive_partner_check_ref)
{
SignatureFileInfoSet signatureSet;
- SignatureFinder signatureFinder(TestData::widget_negative_hash_path);
+ SignatureFinder signatureFinder(TestData::widget_partner_path);
RUNNER_ASSERT_MSG(
SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
"SignatureFinder failed");
SignatureValidator validator(sig);
SignatureData data;
VCerr result = validator.check(
- TestData::widget_negative_hash_path,
- false,
+ TestData::widget_partner_path,
+ true,
true,
data);
- if (!data.isAuthorSignature())
- RUNNER_ASSERT_MSG(result == E_SIG_INVALID_FORMAT,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
- else
- RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
+
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "sig validation should be success: "
+ << validator.errorToString(result));
+
+ if (!data.isAuthorSignature()) {
+ RUNNER_ASSERT_MSG(data.getVisibilityLevel() == CertStoreId::VIS_PARTNER,
+ "visibility check failed.");
+ }
}
}
-RUNNER_TEST(T00122_signature_validator_negative_signature_input)
+RUNNER_TEST(T00104_positive_public_uncheck_ref)
{
SignatureFileInfoSet signatureSet;
- SignatureFinder signatureFinder(TestData::widget_negative_signature_path);
+ SignatureFinder signatureFinder(TestData::widget_path);
RUNNER_ASSERT_MSG(
SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
"SignatureFinder failed");
+
for (auto &sig : signatureSet) {
SignatureValidator validator(sig);
SignatureData data;
VCerr result = validator.check(
- TestData::widget_negative_signature_path,
- false,
+ TestData::widget_path,
true,
+ false,
data);
- if (!data.isAuthorSignature())
- RUNNER_ASSERT_MSG(result == E_SIG_INVALID_FORMAT,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
- else
+ if (data.isAuthorSignature())
RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
+ "author sig validation should be disregraded: "
+ << validator.errorToString(result));
+ else
+ if (data.getSignatureNumber() == 1)
+ RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
+ "disg1 sig validation should be disregarded: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "dist22 sig validation should be success: "
+ << validator.errorToString(result));
}
}
-RUNNER_TEST(T00123_signature_validator_partner)
+RUNNER_TEST(T00105_positive_partner_uncheck_ref)
{
SignatureFileInfoSet signatureSet;
SignatureFinder signatureFinder(TestData::widget_partner_path);
SignatureData data;
VCerr result = validator.check(
TestData::widget_partner_path,
- false,
true,
+ false,
data);
RUNNER_ASSERT_MSG(result == E_SIG_NONE,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
- if (!data.isAuthorSignature()) {
- RUNNER_ASSERT_MSG(
- data.getVisibilityLevel() == CertStoreId::VIS_PARTNER,
- "visibility check failed.");
- }
+ "sig validation should be success: "
+ << validator.errorToString(result));
+
+ if (!data.isAuthorSignature())
+ RUNNER_ASSERT_MSG(data.getVisibilityLevel() == CertStoreId::VIS_PARTNER,
+ "visibility check failed.");
}
}
-/*
- * test: Integration test of SignatureFinder, SignatureReader,
- * SignatureValidator
- * description: Directory passed to SignatureFinded constructor should be searched
- * and 3 signature should be find. All signature should be parsed and verified.
- * expected: Verificator should DISREGARD author signature and VERIFY
- * distrubutor signature.
- */
-RUNNER_TEST(T0013_signature_validator)
+
+RUNNER_TEST(T00106_positive_tpk)
{
SignatureFileInfoSet signatureSet;
- SignatureFinder signatureFinder(TestData::widget_path);
+ SignatureFinder signatureFinder(TestData::tpk_path);
RUNNER_ASSERT_MSG(
SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
"SignatureFinder failed");
-
for (auto &sig : signatureSet) {
SignatureValidator validator(sig);
SignatureData data;
VCerr result = validator.check(
- TestData::widget_path,
- false,
- false,
+ TestData::tpk_path,
+ true,
+ true,
data);
if (data.isAuthorSignature())
- RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Validation failed");
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "author sig validation should be success: "
+ << validator.errorToString(result));
else
- if (data.getSignatureNumber() == 1)
- RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Validation failed");
- else
- RUNNER_ASSERT_MSG(result == E_SIG_NONE,
- "Validation failed");
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "dist sig validation should be success: "
+ << validator.errorToString(result));
}
}
-RUNNER_TEST(T00131_signature_validator_negative_hash_input)
+RUNNER_TEST(T00107_positive_tpk_with_userdata)
+{
+ SignatureFileInfoSet signatureSet;
+ SignatureFinder signatureFinder(TestData::tpk_with_userdata_path);
+ RUNNER_ASSERT_MSG(
+ SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
+ "SignatureFinder failed");
+
+ UriList uriList;
+ uriList.emplace_back("author-siganture.xml");
+ uriList.emplace_back("bin/preference");
+ uriList.emplace_back("res/edje/pref_buttons_panel.edj");
+ uriList.emplace_back("res/edje/pref_edit_panel.edj");
+ uriList.emplace_back("res/edje/preference.edj");
+ uriList.emplace_back("res/images/icon_delete.png");
+ uriList.emplace_back("res/res.xml");
+ uriList.emplace_back("shared/res/preference.png");
+ uriList.emplace_back("tizen-manifest.xml");
+
+ for (auto &sig : signatureSet) {
+ SignatureValidator validator(sig);
+ SignatureData data;
+ VCerr result = validator.checkList(
+ true,
+ uriList,
+ data);
+
+ if (data.isAuthorSignature())
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "author sig validation should be success: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "dist sig validation should be success: "
+ << validator.errorToString(result));
+ }
+}
+
+RUNNER_TEST(T00151_negative_hash_check_ref)
{
SignatureFileInfoSet signatureSet;
SignatureFinder signatureFinder(TestData::widget_negative_hash_path);
SignatureData data;
VCerr result = validator.check(
TestData::widget_negative_hash_path,
- false,
- false,
+ true,
+ true,
data);
-
- if (!data.isAuthorSignature())
- RUNNER_ASSERT_MSG(result == E_SIG_INVALID_FORMAT,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
- else
+ if (data.isAuthorSignature())
RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
+ "author sig shouldn't be failed because it only checks cert chain: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_SIG,
+ "dist sig shouldn't be success: "
+ << validator.errorToString(result));
}
}
-RUNNER_TEST(T00132_signature_validator_negative_signature_input)
+RUNNER_TEST(T00152_negative_hash_uncheck_ref)
{
SignatureFileInfoSet signatureSet;
- SignatureFinder signatureFinder(TestData::widget_negative_signature_path);
+ SignatureFinder signatureFinder(TestData::widget_negative_hash_path);
RUNNER_ASSERT_MSG(
SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
"SignatureFinder failed");
SignatureValidator validator(sig);
SignatureData data;
VCerr result = validator.check(
- TestData::widget_negative_signature_path,
- false,
+ TestData::widget_negative_hash_path,
+ true,
false,
data);
- if (!data.isAuthorSignature())
- RUNNER_ASSERT_MSG(result == E_SIG_INVALID_FORMAT,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
- else
+ if (data.isAuthorSignature())
RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
+ "author sig shouldn't be failed because it only checks cert chain: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_SIG,
+ "dist sig shouldn't be success: "
+ << validator.errorToString(result));
}
}
-RUNNER_TEST(T00133_signature_validator_partner)
+RUNNER_TEST(T00153_negative_signature_check_ref)
{
SignatureFileInfoSet signatureSet;
- SignatureFinder signatureFinder(TestData::widget_partner_path);
+ SignatureFinder signatureFinder(TestData::widget_negative_signature_path);
RUNNER_ASSERT_MSG(
SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
"SignatureFinder failed");
SignatureValidator validator(sig);
SignatureData data;
VCerr result = validator.check(
- TestData::widget_partner_path,
- false,
- false,
+ TestData::widget_negative_signature_path,
+ true,
+ true,
data);
- RUNNER_ASSERT_MSG(result == E_SIG_NONE,
- "Wrong input file but success.. Errorcode : " << validator.errorToString(result));
-
- if (!data.isAuthorSignature())
- RUNNER_ASSERT_MSG(data.getVisibilityLevel() == CertStoreId::VIS_PARTNER,
- "visibility check failed.");
+ if (data.isAuthorSignature())
+ RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
+ "author sig validation should be disregarded: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_SIG,
+ "dist sig validation should be failed: "
+ << validator.errorToString(result));
}
}
-/*
- * test: Integration test of SignatureFinder, SignatureReader,
- * SignatureValidator, ReferenceValidator
- * description: As above but this test also checks reference from signatures.
- * expected: All reference checks should return NO_ERROR.
- */
-RUNNER_TEST(T0014_signature_reference)
+RUNNER_TEST(T00154_negative_signature_uncheck_ref)
{
SignatureFileInfoSet signatureSet;
- SignatureFinder signatureFinder(TestData::widget_path);
+ SignatureFinder signatureFinder(TestData::widget_negative_signature_path);
RUNNER_ASSERT_MSG(
SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
"SignatureFinder failed");
-
for (auto &sig : signatureSet) {
SignatureValidator validator(sig);
SignatureData data;
VCerr result = validator.check(
- TestData::widget_path,
- false,
+ TestData::widget_negative_signature_path,
+ true,
false,
data);
if (data.isAuthorSignature())
RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Validation failed");
+ "author sig validation should be disregarded: "
+ << validator.errorToString(result));
else
- if (data.getSignatureNumber() == 1)
- RUNNER_ASSERT_MSG(result == E_SIG_DISREGARDED,
- "Validation failed");
- else
- RUNNER_ASSERT_MSG(result == E_SIG_NONE,
- "Validation failed");
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_SIG,
+ "dist sig should be failed: "
+ << validator.errorToString(result));
}
}
-/*
- * test: ReferenceValidator::checkReference
- * description: Simple test. File "encoding test.empty" exists.
- * expected: checkReference should return NO_ERROR.
- */
-/*
-RUNNER_TEST(T00141_signature_reference_encoding_dummy)
+RUNNER_TEST(T00155_negative_tpk_with_added_malfile)
{
- ReferenceSet referenceSet;
- SignatureData data;
- ReferenceValidator val("/usr/apps/widget/tests/reference");
- referenceSet.insert("encoding test.empty");
- data.setReference(referenceSet);
-
- int temp = val.checkReferences(data);
- RUNNER_ASSERT_MSG(ReferenceValidator::NO_ERROR == temp,
- "Errorcode : " << refValidatorErrorToString(temp));
-}
-*/
+ SignatureFileInfoSet signatureSet;
+ SignatureFinder signatureFinder(TestData::attacked_tpk_path);
+ RUNNER_ASSERT_MSG(
+ SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
+ "SignatureFinder failed");
-/*
- * test: ReferenceValidator::checkReference
- * description: Negative test. File "encoding test" does not exists.
- * expected: checkReference should return ERROR_REFERENCE_NOT_FOUND
- */
-/*
-RUNNER_TEST(T00142_signature_reference_encoding_negative)
-{
- ReferenceSet referenceSet;
- SignatureData data;
- ReferenceValidator val("/usr/apps/widget/tests/reference");
- referenceSet.insert("encoding test");
- data.setReference(referenceSet);
-
- int temp = val.checkReferences(data);
- RUNNER_ASSERT_MSG(ReferenceValidator::ERROR_REFERENCE_NOT_FOUND == temp,
- "Errorcode : " << refValidatorErrorToString(temp));
-}
-*/
+ for (auto &sig : signatureSet) {
+ SignatureValidator validator(sig);
+ SignatureData data;
+ VCerr result = validator.check(
+ TestData::attacked_tpk_path,
+ true,
+ true,
+ data);
-/*
- * test: ReferenceValidator::checkReference, ReferenceValidator::decodeProcent
- * description: File "encoding test.empty" exists. Name set in referenceSet must
- * be encoded first by decodeProcent function.
- * expected: checkReference should return NO_ERROR
- */
-/*
-RUNNER_TEST(T00143_signature_reference_encoding_space)
-{
- ReferenceSet referenceSet;
- SignatureData data;
- ReferenceValidator val("/usr/apps/widget/tests/reference");
- referenceSet.insert("encoding%20test.empty");
- data.setReference(referenceSet);
-
- int temp = val.checkReferences(data);
- RUNNER_ASSERT_MSG(ReferenceValidator::NO_ERROR == temp,
- "Errorcode : " << refValidatorErrorToString(temp));
+ if (data.isAuthorSignature())
+ RUNNER_ASSERT_MSG(result == E_SIG_NONE,
+ "author sig validation should be success: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_REF,
+ "dist sig validation should be failed: "
+ << validator.errorToString(result));
+ }
}
-*/
-/*
- * test: ReferenceValidator::checkReference, ReferenceValidator::decodeProcent
- * description: Negative test. File "encoding test" does not exists. Name set in
- * referenceSet must be encoded first by decodeProcent function.
- * expected: checkReference should return ERROR_REFERENCE_NOT_FOUND
- */
-/*
-RUNNER_TEST(T00144_signature_reference_encoding_space_negative)
+RUNNER_TEST(T00156_negative_tpk_with_userdata_file_changed_in_list)
{
- ReferenceSet referenceSet;
- SignatureData data;
- ReferenceValidator val("/usr/apps/widget/tests/reference");
- referenceSet.insert("encoding%20test");
- data.setReference(referenceSet);
-
- int temp = val.checkReferences(data);
- RUNNER_ASSERT_MSG(ReferenceValidator::ERROR_REFERENCE_NOT_FOUND == temp,
- "Errorcode : " << refValidatorErrorToString(temp));
-}
-*/
+ SignatureFileInfoSet signatureSet;
+ SignatureFinder signatureFinder(TestData::attacked_tpk_with_userdata_path);
+ RUNNER_ASSERT_MSG(
+ SignatureFinder::NO_ERROR == signatureFinder.find(signatureSet),
+ "SignatureFinder failed");
-/*
- * test: ReferenceValidator::checkReference, ReferenceValidator::decodeProcent
- * description: File "encoding test.empty" exists. Name set in
- * referenceSet must be encoded first by decodeProcent function.
- * expected: checkReference should return NO_ERROR
- */
-/*
-RUNNER_TEST(T00145_signature_reference_encoding)
-{
- ReferenceSet referenceSet;
- SignatureData data;
- ReferenceValidator val("/usr/apps/widget/tests/reference");
- referenceSet.insert("e%6Ec%6Fding%20te%73%74.e%6d%70ty");
- data.setReference(referenceSet);
-
- int temp = val.checkReferences(data);
- RUNNER_ASSERT_MSG(ReferenceValidator::NO_ERROR == temp,
- "Errorcode : " << refValidatorErrorToString(temp));
-}
-*/
+ UriList uriList;
+ uriList.emplace_back("author-siganture.xml");
+ uriList.emplace_back("bin/preference");
+ uriList.emplace_back("res/edje/pref_buttons_panel.edj");
+ uriList.emplace_back("res/edje/pref_edit_panel.edj");
+ uriList.emplace_back("res/edje/preference.edj");
+ uriList.emplace_back("res/images/icon_delete.png");
+ uriList.emplace_back("res/res.xml");
+ uriList.emplace_back("shared/res/preference.png");
-/*
- * test: ReferenceValidator::checkReference, ReferenceValidator::decodeProcent
- * description: Negative test. "%%" is illegal combination of char. decodeProcent
- * should throw exception.
- * expected: checkReference should return ERROR_DECODING_URL
- */
-/*
-RUNNER_TEST(T00146_signature_reference_encoding_negative)
-{
- ReferenceSet referenceSet;
- SignatureData data;
- ReferenceValidator val("/usr/apps/widget/tests/reference");
- referenceSet.insert("e%6Ec%6Fding%%0test%2ete%73%74");
- data.setReference(referenceSet);
-
- int temp = val.checkReferences(data);
- RUNNER_ASSERT_MSG(ReferenceValidator::ERROR_DECODING_URL == temp,
- "Errorcode : " << refValidatorErrorToString(temp));
-}
-*/
+ /* this file is modified after signing app */
+ uriList.emplace_back("tizen-manifest.xml");
+ for (auto &sig : signatureSet) {
+ SignatureValidator validator(sig);
+ SignatureData data;
+ VCerr result = validator.checkList(
+ true,
+ uriList,
+ data);
+
+ if (data.isAuthorSignature())
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_SIG,
+ "author sig validation should be failed: "
+ << validator.errorToString(result));
+ else
+ RUNNER_ASSERT_MSG(result == E_SIG_INVALID_SIG,
+ "dist sig validation should be failed: "
+ << validator.errorToString(result));
+ }
+}
RUNNER_TEST_GROUP_INIT(T0020_SigVal_errorstring)
<< validator.errorToString(code) << std::endl;
}
}
-
-RUNNER_TEST_GROUP_INIT(T0030_Certificate)
-
-/*
- * test: class Certificate
- * description: Certificate should parse data passed to object constructor.
- * expected: Getters should be able to return certificate information.
- */
-RUNNER_TEST(T0031_Certificate)
-{
- Certificate cert(TestData::certVerisign, Certificate::FORM_BASE64);
- std::string result;
-
- result = cert.getCommonName(Certificate::FIELD_SUBJECT);
- RUNNER_ASSERT_MSG(!result.empty(), "No common name");
- RUNNER_ASSERT_MSG(!result.compare("www.verisign.com"), "CommonName mismatch");
-
- result = cert.getCommonName(Certificate::FIELD_ISSUER);
- RUNNER_ASSERT_MSG(!result.empty(), "No common name");
- RUNNER_ASSERT_MSG(!result.compare("VeriSign Class 3 Extended Validation SSL SGC CA"),
- "CommonName mismatch");
-
- result = cert.getCountryName();
- RUNNER_ASSERT_MSG(!result.empty(), "No country");
- RUNNER_ASSERT_MSG(!result.compare("US"), "Country mismatch");
-}
-
-/*
- * test: Certificate::getFingerprint
- * description: Certificate should parse data passed to object constructor.
- * expected: Function fingerprint should return valid fingerprint.
- */
-RUNNER_TEST(T0032_Certificate)
-{
- Certificate cert(TestData::certVerisign, Certificate::FORM_BASE64);
-
- Certificate::Fingerprint fin =
- cert.getFingerprint(Certificate::FINGERPRINT_SHA1);
-
- unsigned char buff[20] = {
- 0xb9, 0x72, 0x1e, 0xd5, 0x49,
- 0xed, 0xbf, 0x31, 0x84, 0xd8,
- 0x27, 0x0c, 0xfe, 0x03, 0x11,
- 0x19, 0xdf, 0xc2, 0x2b, 0x0a};
- RUNNER_ASSERT_MSG(fin.size() == 20, "Wrong size of fingerprint");
-
- for (size_t i = 0; i<20; ++i) {
- RUNNER_ASSERT_MSG(fin[i] == buff[i], "Fingerprint mismatch");
- }
-}
-
-/*
- * test: Certificate::getAlternativeNameDNS
- * description: Certificate should parse data passed to object constructor.
- * expected: Function getAlternativeNameDNS should return list of
- * alternativeNames hardcoded in certificate.
- */
-RUNNER_TEST(T0033_Certificate)
-{
- Certificate cert(TestData::certVerisign, Certificate::FORM_BASE64);
-
- Certificate::AltNameSet nameSet = cert.getAlternativeNameDNS();
-
- RUNNER_ASSERT(nameSet.size() == 8);
-
- std::string str("verisign.com");
- RUNNER_ASSERT(nameSet.find(str) != nameSet.end());
-
- str = std::string("fake.com");
- RUNNER_ASSERT(nameSet.find(str) == nameSet.end());
-
-}
-
-/*
- * test: Certificate::isCA
- * description: Certificate should parse data passed to object constructor.
- * expected: 1st and 2nd certificate should be identified as CA.
- */
-RUNNER_TEST(T0034_Certificate_isCA)
-{
- Certificate cert1(TestData::googleCA, Certificate::FORM_BASE64);
- RUNNER_ASSERT(cert1.isCA() > 0);
-
- Certificate cert2(TestData::google2nd, Certificate::FORM_BASE64);
- RUNNER_ASSERT(cert2.isCA() > 0);
-
- Certificate cert3(TestData::google3rd, Certificate::FORM_BASE64);
- RUNNER_ASSERT(cert3.isCA() == 0);
-}