platform/core/test/security-tests.git
7 years agoAdd tests for cynara-creds-dbus 38/30438/17
Aleksander Zdyb [Wed, 11 Mar 2015 11:02:01 +0000 (12:02 +0100)]
Add tests for cynara-creds-dbus

Change-Id: Iea7f5e9290899302cd4b2c992110895591ae8903
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
8 years agoMerge branch 'tizen' into cynara 50/69050/1
Zbigniew Jasinski [Wed, 11 May 2016 08:44:56 +0000 (10:44 +0200)]
Merge branch 'tizen' into cynara

Change-Id: I3e39ad9da3ad9b718862d6ed10baed35b29f7601
Signed-off-by: Zbigniew Jasinski <z.jasinski@samsung.com>
8 years agoBuild all tests by default, add possibility to separate build. 08/67608/1
Dariusz Michaluk [Wed, 27 Apr 2016 10:58:51 +0000 (12:58 +0200)]
Build all tests by default, add possibility to separate build.

Change-Id: Ifde7293123c087172900f7c8699be5a8e6df06d6

8 years agoMake dlog backend optional. 07/67607/1
Dariusz Michaluk [Tue, 26 Apr 2016 14:57:11 +0000 (16:57 +0200)]
Make dlog backend optional.

Change-Id: I59f52d7de4583bc945d33a0e109a3f4477d0a8b9

8 years agoRemove unused API_VERSION from CMake. 06/67606/1
Dariusz Michaluk [Tue, 26 Apr 2016 15:34:42 +0000 (17:34 +0200)]
Remove unused API_VERSION from CMake.

Change-Id: I8c05d948cd83d05ee2e83740b91e0a440b97dfdd

8 years agoDrop libiri dependency, library is not used anymore. 05/67605/1
Dariusz Michaluk [Tue, 26 Apr 2016 13:34:37 +0000 (15:34 +0200)]
Drop libiri dependency, library is not used anymore.

Change-Id: I8b50e8461fb5dd9a50e00ddd3fb4c2e540a8b8b2

8 years agoIncrease time limit for RUNNER_CHILD_TEST to 90 seconds 91/66591/2
Rafal Krypa [Tue, 19 Apr 2016 14:59:05 +0000 (16:59 +0200)]
Increase time limit for RUNNER_CHILD_TEST to 90 seconds

Current time limit of 10s for each RUNNER_CHILD_TEST is insufficient.
Several existing tests may take significantly longer time, but they
eventually succeed.

Change-Id: I3867ed3aee0449d95c0fa89b79aa3104f31f81a7
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years agoTemporaryTestUser: encapsulate communication with gumd in separate process 75/66575/2
Rafal Krypa [Tue, 19 Apr 2016 12:26:44 +0000 (14:26 +0200)]
TemporaryTestUser: encapsulate communication with gumd in separate process

Gumd interface libgum has nasty side effects on the calling process.
On the first call to gumd service it allocates persistent resources
in the calling thread that are not freed and are used for subsequent
calls to gumd. These resources include a new thread, socket connection
and two eventfds.

This doesn't play well with process that changes it's Smack label and
DAC credentials back and forth. It also breaks encapsulation between
test cases, leading to nasty "gumd timeout" issues.

This patch attempts to fix this issue by dedicated a separate process
for calling libgum functions. The TemporaryTestUser class will no longer
call libgum directly, but delegate the calls to the dedicated process.

Change-Id: Id111d5ef79d65135e3b378582a220f168f8a2284
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years agoDrop usage of RUNNER_MULTIPROCESS_TEST* 74/66574/2
Rafal Krypa [Tue, 19 Apr 2016 12:03:02 +0000 (14:03 +0200)]
Drop usage of RUNNER_MULTIPROCESS_TEST*

Replace all uses of RUNNER_MULTIPROCESS_TEST* with RUNNER_CHILD_TEST* because of
several issues of multiprocess test functionality:
- it runs the test function in the main process, suffering from all the issues
  that plagued RUNNER_TEST
- it doesn't handle waiting and error checking for child processes of higher
  order
- it hangs when the main process has a pre-existing child process prior to
  invocation of RUNNER_MULTIPROCESS_TEST*

Simpler RUNNER_CHILD_TEST* macros are sufficient replacement for the broken
ones. We never used additional features provided by RUNNER_MULTIPROCESS_TEST*.

Change-Id: I8583a5b8829343f14c03e8336015f5322122369d
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years agoRemove invocation of api_feature_loader in %post 98/64998/1
Rafal Krypa [Wed, 6 Apr 2016 14:14:28 +0000 (16:14 +0200)]
Remove invocation of api_feature_loader in %post

This binary was part of libprivilege-control, support for which was dropped
in the previous commit.

Change-Id: I492a597ee7e2aca46f143fb211cb9560ae8a21f5

8 years agoRemove libprivilege-control tests 79/64679/1
Rafal Krypa [Mon, 4 Apr 2016 15:04:58 +0000 (17:04 +0200)]
Remove libprivilege-control tests

Libprivilege-control should be long gone on Tizen 3.0.
There is no point in keeping those tests here.

Change-Id: I9dc6f27952e41a632d607faed14cfe45849d1d40
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years agoMerge branch 'tizen' into cynara 80/63580/1
Zbigniew Jasinski [Thu, 24 Mar 2016 14:38:15 +0000 (15:38 +0100)]
Merge branch 'tizen' into cynara

Change-Id: I423b5ba80bd203c9c70a633885c12f2a7efc468b

8 years agoMerge branch 'ckm' into tizen 05/63005/1
Zbigniew Jasinski [Mon, 21 Mar 2016 12:14:51 +0000 (13:14 +0100)]
Merge branch 'ckm' into tizen

Change-Id: I34396fcbad8b282e7d72ca6d596f4eb246d33840

8 years agoCKM::ErrorToString removed from key-manager 91/62391/1
Kyungwook Tak [Wed, 16 Mar 2016 01:40:34 +0000 (10:40 +0900)]
CKM::ErrorToString removed from key-manager

Change-Id: I74d50dfc88b3c2a7196872ca7c4393665e5ef323
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdopt test to cynara 0.10.0 81/61681/1
Bartlomiej Grzelewski [Fri, 4 Mar 2016 15:39:52 +0000 (16:39 +0100)]
Adopt test to cynara 0.10.0

Change-Id: If92f1b02a0591fb9ebf4c086c777399362d60ca7

8 years agoMerge branch 'tizen' into cynara 31/60631/1
Zbigniew Jasinski [Mon, 29 Feb 2016 11:16:50 +0000 (12:16 +0100)]
Merge branch 'tizen' into cynara

Conflicts:
src/security-server-tests/security_server_tests_password.cpp

Change-Id: I753ad499c1bf64330fc0af352e7468c13539c752

8 years agoCKM: Process identification test. 60/59460/1
Bartlomiej Grzelewski [Mon, 15 Feb 2016 11:26:24 +0000 (12:26 +0100)]
CKM: Process identification test.

Change-Id: I829c31ff3601ffbbab7d3ae4a72e8128333fabe0

8 years agoMerge remote-tracking branch 'tizen/tizen' into ckm 25/59425/1
Bartlomiej Grzelewski [Mon, 15 Feb 2016 10:59:52 +0000 (11:59 +0100)]
Merge remote-tracking branch 'tizen/tizen' into ckm

Change-Id: Ieb9b5bd0f3c25ef9d37472cab42187d1b60b4f6d

8 years agoMerge branch 'security-manager' into tizen 24/59424/1
Bartlomiej Grzelewski [Mon, 15 Feb 2016 10:58:08 +0000 (11:58 +0100)]
Merge branch 'security-manager' into tizen

Change-Id: Ia22cf2876e6e034c74e135814523f43740b79501

8 years agosecurity-manager: add tests for security_manager_app_has_privilege 89/58889/2
Rafal Krypa [Wed, 10 Feb 2016 12:31:13 +0000 (13:31 +0100)]
security-manager: add tests for security_manager_app_has_privilege

Change-Id: I77ba0e25c95d6dd6dcce3ade7d938884a8896f77

8 years agoAdd SM tests for getting pkg & app Id from sock or pid 87/48887/8
Rafal Krypa [Wed, 10 Feb 2016 12:30:20 +0000 (13:30 +0100)]
Add SM tests for getting pkg & app Id from sock or pid

Change-Id: Ic0afac87c087ad819806a8be89d41cbf018e5d16

8 years agoRemove SM privilege mapping tests 88/58888/2
Rafal Krypa [Thu, 4 Feb 2016 11:48:42 +0000 (12:48 +0100)]
Remove SM privilege mapping tests

Functionality removed from security-manager, now provided by privilege-checker
(which is out of our project scope).

Change-Id: Ica93ab99f2617c97f538e60965a5098d5614acdf

8 years agosecurity-manager: fix privilege-to-gid mapping tests 40/57040/3
Rafal Krypa [Thu, 14 Jan 2016 14:56:39 +0000 (15:56 +0100)]
security-manager: fix privilege-to-gid mapping tests

Verification whether privileges are correctly mapped to grouops is based
on an assumption that the privileges used (camera, location) are not mapped
to any groups in the real configuration. But recently the camera privilege has
been mapped to a group "priv_camera" on the image.
To keep the test working, it now uses a different privilege instead ("nfc") that
doesn't have a group associated to it.

Change-Id: I3cb6ae7911abb5c7efab6558ffdb8043714fbce7
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years ago[SM] Turn off tests that does not work because of gumd timeout. 88/58788/2
Bartlomiej Grzelewski [Tue, 2 Feb 2016 15:08:30 +0000 (16:08 +0100)]
[SM] Turn off tests that does not work because of gumd timeout.

Change-Id: Ib5ea1935e370486c13f4f27d5d34adf12b444a30

8 years agoMerge remote-tracking branch 'tizen/tizen' into ckm 90/58790/1
Bartlomiej Grzelewski [Wed, 3 Feb 2016 11:05:07 +0000 (12:05 +0100)]
Merge remote-tracking branch 'tizen/tizen' into ckm

Change-Id: Idd9657344d2e3130e2f92557545f3884732ef3af

8 years ago[SM] Changes in InstallRequest API. 87/58787/1
Bartlomiej Grzelewski [Tue, 2 Feb 2016 11:53:37 +0000 (12:53 +0100)]
[SM] Changes in InstallRequest API.

Replace "const char *" with std::string type.

Change-Id: I955f850ea1f09e310fbd0ae7775c84fe6f15c2e5

8 years ago[SM] Apply/drop sharing tests 38/58538/4
Zofia Abramowska [Fri, 29 Jan 2016 15:49:13 +0000 (16:49 +0100)]
[SM] Apply/drop sharing tests

Change-Id: I21e89b450726efef8041d128c4a2221e8dc7009e

8 years ago[SM] Tests for trusted dir. 62/58262/3
Bartlomiej Grzelewski [Thu, 28 Jan 2016 18:57:12 +0000 (19:57 +0100)]
[SM] Tests for trusted dir.

Change-Id: I4c97747253b8395a41bd85c004104f66bffc852a

8 years agoAdd security_manager_app_inst_req_set_author_id tests 59/57159/5
Krzysztof Jackiewicz [Fri, 15 Jan 2016 12:38:45 +0000 (13:38 +0100)]
Add security_manager_app_inst_req_set_author_id tests

[Verification] Run security-manager-tests --regexp=security_manager_27

Change-Id: Idd9705f8328cb352039821804dd961bf68a25b49

8 years agosecurity-manager: added tests of 2.X shared folders backward compatibility 57/58357/2
Maciej J. Karpiuk [Thu, 28 Jan 2016 09:06:54 +0000 (10:06 +0100)]
security-manager: added tests of 2.X shared folders backward compatibility

Change-Id: Ic83a9570a1bff97a80c4a3bfc4e38d73bee472f0

8 years agoMerge branch 'tizen' into security-manager 26/58126/1
Bartlomiej Grzelewski [Wed, 27 Jan 2016 16:50:49 +0000 (17:50 +0100)]
Merge branch 'tizen' into security-manager

Change-Id: I1740cb2f5e0aa5de10952364e05b03a10c115b11

8 years agoMerge branch 'ckm' into tizen 25/58125/1
Bartlomiej Grzelewski [Wed, 27 Jan 2016 16:45:05 +0000 (17:45 +0100)]
Merge branch 'ckm' into tizen

Change-Id: Ia52221f3c05fa81a4d5b53bd183ca0174f49020e

8 years agoRemove key-manager-listener dependency. 20/58120/3
Bartlomiej Grzelewski [Wed, 27 Jan 2016 15:37:08 +0000 (16:37 +0100)]
Remove key-manager-listener dependency.

key-manager-listener package is empty.
Its functionality is provided by key-manager package now.

Change-Id: Ib7ce4575ae507825b408c80eccfe6e1df8543465

8 years agoDrop tests related to security-server 39/57039/1
Rafal Krypa [Thu, 14 Jan 2016 14:43:54 +0000 (15:43 +0100)]
Drop tests related to security-server

Security-server has been removed from Tizen 3.0 images.

Change-Id: I6cd8349abd94b2136726a357f515308cb482bce9
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years agoCKM: Read ckm data dir location from tzplatform_config 73/56773/3
Krzysztof Jackiewicz [Tue, 12 Jan 2016 12:24:40 +0000 (13:24 +0100)]
CKM: Read ckm data dir location from tzplatform_config

[Problem] Key-manager reads data dir location from tzplatform_config.
Security-tests have the path hardcoded.
[Solution] Make security-tests read data dir location from tzplatform_config as
well.

[Verification] Run ckm-tests

Change-Id: I3e5c6f98bc34c27664218972e6ee76139b0a12e7

8 years agoCKM: Fix T3203_CAPI_lock_database 36/56236/1
Krzysztof Jackiewicz [Tue, 5 Jan 2016 12:28:00 +0000 (13:28 +0100)]
CKM: Fix T3203_CAPI_lock_database

[Problem] Test is failing because ordinary user attempts to lock its database.
[Solution] Test is modified so that it's executed as root.

[Verification] Run ckm-tests --group=T320_CAPI_EMPTY_DATABASE

Change-Id: I5dd9893792be4dbcc4e2161dbe48f99bafcbc7dc

8 years agoCKM: Revert "Add PASSWORD_PROTECTION_DISABLE feature" 35/56235/1
Krzysztof Jackiewicz [Tue, 5 Jan 2016 12:21:16 +0000 (13:21 +0100)]
CKM: Revert "Add PASSWORD_PROTECTION_DISABLE feature"

This reverts commit 83ce88e2df836f7fe23260f635c6ef69d26c748b.

Change-Id: I59bca49f8c4cb67fabda6a455ff7533a507abb6e

8 years agoCKM: Unblock ocsp test. 71/55271/2
Bartlomiej Grzelewski [Tue, 22 Dec 2015 17:36:06 +0000 (18:36 +0100)]
CKM: Unblock ocsp test.

Change-Id: Icad1ae774a6413c72b0eb71fc6c76cddd898f464

8 years agoCKM: Remove ccMode related code. 67/55267/3
Bartlomiej Grzelewski [Tue, 22 Dec 2015 15:30:19 +0000 (16:30 +0100)]
CKM: Remove ccMode related code.

Support for MDPP state was removed from key-manager code.
Also the change of ccMode is no longer suppoted in key-manager.

Change-Id: Ic06bc7294aeeb1a0d795154cb636d3977d8d330d

8 years agoRevert "CKM: Turn off all broken tests." 78/55078/1
Bartlomiej Grzelewski [Mon, 30 Nov 2015 16:24:31 +0000 (17:24 +0100)]
Revert "CKM: Turn off all broken tests."

This reverts commit 86ba2aa7c6e01dd9193e08d01ba1c2f8bfc2d459.

Change-Id: Icd0af8e29d8eece9c1884d92cf34f61d5d37e569

8 years agoCKM: Remove GarbageCollector 36/54736/2
Bartlomiej Grzelewski [Thu, 17 Dec 2015 10:52:44 +0000 (11:52 +0100)]
CKM: Remove GarbageCollector

Change-Id: I75e1a61f9e705c261000426c07b41fd5c466da30

8 years agoSet Agent policy according to user provided by test case 86/54286/2
Lukasz Kostyra [Mon, 14 Dec 2015 08:50:28 +0000 (09:50 +0100)]
Set Agent policy according to user provided by test case

[Bug]           On some occasions tests failed randomly.
[Cause]         Some images (ex. mobile profile on RD-PQ) had other
                services running in the background, which asked Cynara
                for privileges during tests. This caused an incorrect
                behavior of getAgentRequest function (timeout was expected
                to launch client on separate thread, instead a request
                was successfully processed and no timeout occured).
[Solution]      User in CheckData structure now does not depend on a minor
                number.
                setAgentPolicy() has additional argument - user, used to
                filter incoming requests.
[Verification]  Build, install on RD-PQ, run tests multiple times.

Change-Id: Icccf09b8a72929145f624242ace14a60076761a4

8 years agoRemove uncaught_exception uses in tests 38/49538/6
Lukasz Kostyra [Tue, 6 Oct 2015 13:18:25 +0000 (15:18 +0200)]
Remove uncaught_exception uses in tests

[Bug/Feature]   uncaught_exception is bugged since 2008 and can return a false
                result on some specific situations (refer to
                https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37477 for more
                info).
                Some tests (especially Cynara Agent) relied on uncaught_exception,
                which when failed resulted in double-throwing. This caused instant
                test termination and emitted SIGABRT.
[Solution]      Remove uncaught_exception calls, reorganize some test parts to
                avoid throws propagating outside destructors.
                Additionally, minor corrections to boilerplates (copyright date)
                were made.
[Verification]  Build, install, run tests several times on mobile image. The
                tests should not receive SIGABRT during Cynara Agent tests.
                Test results should be unaltered (some of the tests fail due
                to timeouts).

Change-Id: Iab282e9cac8bd53a69bb60d84511cd6829540037

8 years agoCKM: Replace deprecated certificate with new one. 81/53681/2
Bartlomiej Grzelewski [Tue, 8 Dec 2015 16:00:36 +0000 (17:00 +0100)]
CKM: Replace deprecated certificate with new one.

Change-Id: If400a0f46b763d30703718b0635dfc33eb496285

8 years agoCKM: Comment out deprecated integration tests. 80/53680/1
Bartlomiej Grzelewski [Tue, 8 Dec 2015 11:13:42 +0000 (12:13 +0100)]
CKM: Comment out deprecated integration tests.

Change-Id: I3679ce2f8fb62731d973adabb2308f2bfdf05af5

8 years agoIncrease timeout in tcag10 76/52976/1
Lukasz Kostyra [Mon, 30 Nov 2015 10:04:16 +0000 (11:04 +0100)]
Increase timeout in tcag10

Change-Id: I0cb0089f29e537b967bbe106fe32e3710c65eb60

8 years agoMerge branch 'tizen' into ckm 74/52974/1
Zbigniew Jasinski [Mon, 30 Nov 2015 11:57:48 +0000 (12:57 +0100)]
Merge branch 'tizen' into ckm

Change-Id: I420a571f81f4abdec743722b0ebac6c128b399d6

8 years agoCKM: Turn off all broken tests. 41/52941/1
Bartlomiej Grzelewski [Fri, 27 Nov 2015 11:41:49 +0000 (12:41 +0100)]
CKM: Turn off all broken tests.

Change-Id: I21d32cae8a6681955efdd336c93a8345b1b7c754

8 years agoCKM: test for encrypted initial values 00/42500/17
Maciej J. Karpiuk [Mon, 29 Jun 2015 10:23:02 +0000 (12:23 +0200)]
CKM: test for encrypted initial values

Change-Id: Ic395d86caff2649d2a4adb801007dc68d1cc502f

8 years agoCKM: Get rid of GrabageCollector in initial values test 99/51399/2
Krzysztof Jackiewicz [Mon, 9 Nov 2015 08:40:49 +0000 (09:40 +0100)]
CKM: Get rid of GrabageCollector in initial values test

[Problem] GarbageCollector launched for System user will revoke all "System"
rules.
[Solution] GarbageCollector replaced by Env class for test.

[Verification] Run ckm-tests --group=T60_INITIAL_VALUES. There should be no
smack denials in logs.

Change-Id: Ie2c3090286bfc412201b6b46cf4e7cb1596d1c2b

8 years agoAdd PASSWORD_PROTECTION_DISABLE feature 89/52289/1
Dongsun Lee [Fri, 20 Nov 2015 11:24:20 +0000 (20:24 +0900)]
Add PASSWORD_PROTECTION_DISABLE feature

Change-Id: I29215c373931c552c14cfa73ac1a8514a8bd1e62
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoCKM: Google certificate updated 63/50263/3
Krzysztof Jackiewicz [Tue, 27 Oct 2015 09:40:27 +0000 (10:40 +0100)]
CKM: Google certificate updated

[Problem] *.google.com certificate have expired.
[Solution] Certificate updated.

[Verification] Run ckm-tests --group=T307_CKMC_CAPI_CERTIFICATE_CHAINS

Change-Id: I70820a2f62b15e333ae497673ab75f3d53e1e8f0

8 years agoMerge branch 'tizen' into security-manager 72/50272/1
Zbigniew Jasinski [Tue, 27 Oct 2015 09:58:36 +0000 (10:58 +0100)]
Merge branch 'tizen' into security-manager

Change-Id: I9e66326308285f10f2146825918cc37ddcf859f0

8 years agoMerge branch 'tizen' into cynara 65/50265/1
Zbigniew Jasinski [Tue, 27 Oct 2015 09:45:26 +0000 (10:45 +0100)]
Merge branch 'tizen' into cynara

Change-Id: Id4e4b67c7a1c4ded48c2200bdf31727438699344

8 years agoMerge branch 'tizen' into ckm 82/50182/1
Zbigniew Jasinski [Mon, 26 Oct 2015 14:00:36 +0000 (15:00 +0100)]
Merge branch 'tizen' into ckm

Change-Id: Ie5475e1937fa3035a2c4ba4412583bd0b7badf77

8 years agoMerge branch 'ckm' into tizen 81/50181/1
Zbigniew Jasinski [Mon, 26 Oct 2015 14:00:07 +0000 (15:00 +0100)]
Merge branch 'ckm' into tizen

Change-Id: Ic602f0abdd1aae730aeb668cebc50d3bca09616c

8 years ago[CKM] (ACR-429) Remove removed API related TC 80/49580/1
Kyungwook Tak [Mon, 5 Oct 2015 07:14:40 +0000 (16:14 +0900)]
[CKM] (ACR-429) Remove removed API related TC

- ckmc_get_cert_chain_trustedcert_with_alias

Change-Id: I6abe05e1fe729391d0d307d298d2aa158f6d78ff
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoReplace ckmc_label_shared_owner 22/49522/1
Kyungwook Tak [Wed, 14 Oct 2015 08:04:18 +0000 (17:04 +0900)]
Replace ckmc_label_shared_owner

Change-Id: I792190f989ff4f42823e34bdeb07b9d34b0c2738
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agockmc API changed (ACR-392) 10/49010/5
Kyungwook Tak [Mon, 5 Oct 2015 06:11:47 +0000 (15:11 +0900)]
ckmc API changed (ACR-392)

 * ckmc_param_list_s* -> ckmc_param_list_h
 * ckmc_generate_params's parameter changed
- ckmc_param_list_s *params -> ckmc_param_list_h *pparams
 * ckmc_param_list_add_XXX -> ckmc_param_list_set_XXX

Change-Id: Ia3b0831772e76cfdbe77c6d9a9d04961018a37e3
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoMerge branch 'cynara' into tizen 57/49157/1
Oskar Świtalski [Thu, 1 Oct 2015 06:44:58 +0000 (08:44 +0200)]
Merge branch 'cynara' into tizen

Change-Id: I115ec35a71d6f2a08f2dc08bbc6b63e0b0156e50

8 years agoMerge branch 'tizen' into cynara 81/48881/1
Oskar Świtalski [Thu, 1 Oct 2015 06:44:58 +0000 (08:44 +0200)]
Merge branch 'tizen' into cynara

Change-Id: I1fe837c1b66c2e22fbe0791c4575093dce0fce31

8 years agoCKM: Add support for new error code: CKMC_ERROR_NOT_SUPPORTED. 66/48366/1
Bartlomiej Grzelewski [Thu, 17 Sep 2015 15:00:43 +0000 (17:00 +0200)]
CKM: Add support for new error code: CKMC_ERROR_NOT_SUPPORTED.

Change-Id: I2eb31975f03f8b3d63107c9e0da6804ea248c5f1

8 years agoCKMI: Add ckm-integration tests. 58/48058/5
Bartlomiej Grzelewski [Fri, 11 Sep 2015 12:45:43 +0000 (14:45 +0200)]
CKMI: Add ckm-integration tests.

Change-Id: I6a253a2a763e49d61c4b758b87ac240f06536bff

8 years agoCKMI: Implementation of ckm-policy. 57/48057/3
Bartlomiej Grzelewski [Fri, 11 Sep 2015 12:45:02 +0000 (14:45 +0200)]
CKMI: Implementation of ckm-policy.

Change-Id: I60da89cf4aeff7818f7ebd92a1e20eb7f6ac4d96

8 years agoCKMI: Implementation of ProcessSettings module. 56/48056/2
Bartlomiej Grzelewski [Fri, 11 Sep 2015 12:43:31 +0000 (14:43 +0200)]
CKMI: Implementation of ProcessSettings module.

Change-Id: I6e26297ec5238ad65d91120880a7a5df75ac9244

8 years agoMerge branch 'tizen' into ckm 99/47899/1
Bartlomiej Grzelewski [Wed, 9 Sep 2015 16:30:42 +0000 (18:30 +0200)]
Merge branch 'tizen' into ckm

Change-Id: I0f1e194e469e6dd00ef0627ed9d9357eef422afb

8 years agoMerge remote-tracking branch 'tizen/ckm' into tizen 98/47898/1
Bartlomiej Grzelewski [Wed, 9 Sep 2015 16:25:00 +0000 (18:25 +0200)]
Merge remote-tracking branch 'tizen/ckm' into tizen

Change-Id: Ibc41fc4de18b1aaaa5b87dda7b23d7c114f9bb70

8 years agoMerge remote-tracking branch 'tizen/security-manager' into tizen 97/47897/1
Bartlomiej Grzelewski [Wed, 9 Sep 2015 16:22:51 +0000 (18:22 +0200)]
Merge remote-tracking branch 'tizen/security-manager' into tizen

Change-Id: I1cd3c0199be5ec53d3cafff715d9f1159bd9fc8f

8 years agosecurity-manager: adapt tests to new application labeling schema 36/47336/3
Rafal Krypa [Thu, 3 Sep 2015 15:59:28 +0000 (17:59 +0200)]
security-manager: adapt tests to new application labeling schema

Security-manager labeling of application files has been changed
in patch https://review.tizen.org/gerrit/46841.
Adapting tests accordingly.

Change-Id: Ie3bcbaa385845544610bfd83817a71079c99fb8e
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
8 years agoCKM: Fix T120 group of tests. 71/47771/1
Bartlomiej Grzelewski [Tue, 8 Sep 2015 16:01:16 +0000 (18:01 +0200)]
CKM: Fix T120 group of tests.

Change-Id: I8ddf507da7c40e786c9b657b09bf2166ebb930d8

8 years agoCKM: Use pkgId instead smack label in tests. 73/46873/3
Bartlomiej Grzelewski [Wed, 26 Aug 2015 15:59:38 +0000 (17:59 +0200)]
CKM: Use pkgId instead smack label in tests.

Change-Id: Ia912089bacff330df230292fa136d10848534300

8 years agoCKM: AccessProvider2 takes owner id instead smack label. 72/46872/1
Bartlomiej Grzelewski [Wed, 26 Aug 2015 13:28:28 +0000 (15:28 +0200)]
CKM: AccessProvider2 takes owner id instead smack label.

Change-Id: I9d75c180c06336faca33459645b189a64dc287f2

8 years agoCKM: Fix tests for initial-values: T6010, T6030, T6040. 48/46748/3
Bartlomiej Grzelewski [Tue, 25 Aug 2015 13:47:21 +0000 (15:47 +0200)]
CKM: Fix tests for initial-values: T6010, T6030, T6040.

Change-Id: I0182c9e9dcdb1e3f3d4efff9b7c8c1e8349094eb

8 years agoCKM: Fix system-db tests T5037, T5038, T5039. 47/46747/1
Bartlomiej Grzelewski [Mon, 24 Aug 2015 16:50:06 +0000 (18:50 +0200)]
CKM: Fix system-db tests T5037, T5038, T5039.

One of the tests does not clean environement.

Change-Id: Ia7a4d2fd234c23566d009ab922a0e33cb96b63a5

8 years agoCKM: added test for client app trying to add item to system DB [expected fail] 10/46710/3
Maciej J. Karpiuk [Tue, 25 Aug 2015 06:43:53 +0000 (08:43 +0200)]
CKM: added test for client app trying to add item to system DB [expected fail]

Change-Id: I1ed7359ac15ea5593ded8f77009454a1e517ea78

8 years agoReplace ckmc_remove_pkcs12 with ckmc_remove_alias. 46/46746/1
Bartlomiej Grzelewski [Tue, 25 Aug 2015 13:53:20 +0000 (15:53 +0200)]
Replace ckmc_remove_pkcs12 with ckmc_remove_alias.

Change-Id: Ia34541a7963661e074d3313c25970a63e35fd720

8 years agofix build break caused by libwebappenc API change 13/46713/2
Dongsun Lee [Tue, 25 Aug 2015 07:32:55 +0000 (16:32 +0900)]
fix build break caused by libwebappenc API change

Change-Id: I5e6073196d267bb15ef41395dbbeab531b2503df
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoFix tests of systemDB. 60/46460/1
Bartlomiej Grzelewski [Thu, 20 Aug 2015 12:47:24 +0000 (14:47 +0200)]
Fix tests of systemDB.

Change-Id: Icf05c56c39255525589f8ce79cadc96716c2674e

8 years agoAdd SM privilege mapping tests 53/44753/4
Zofia Abramowska [Thu, 16 Jul 2015 15:34:38 +0000 (17:34 +0200)]
Add SM privilege mapping tests

Change-Id: Ib1c86133b116bd7f77e380233144cf7866d900ed

8 years agoAdopt to new implementation of smack. 87/45587/1
Bartlomiej Grzelewski [Fri, 7 Aug 2015 14:27:51 +0000 (16:27 +0200)]
Adopt to new implementation of smack.

In new implmentation connect will success only if
client have "w" rule to system socket and system process
have "w" rule to client.

Change-Id: I68caadb430678b8e8ee5b235576ff4ea95103abe

8 years agoAdopt tests to CKM version 0.1.15. 20/45320/1
Bartlomiej Grzelewski [Tue, 4 Aug 2015 13:50:27 +0000 (15:50 +0200)]
Adopt tests to CKM version 0.1.15.

Change-Id: I8c5c3b2f2fbee9778c084f4d9f7218a149defdca

8 years agoCKM: Update google certificate 13/45013/1
Krzysztof Jackiewicz [Thu, 30 Jul 2015 10:30:58 +0000 (12:30 +0200)]
CKM: Update google certificate

[Problem] Google.com certificate have expired
[Solution] New certificate is used

[Verification] Run ckm-tests --group=T307_CKMC_CAPI_CERTIFICATE_CHAINS

Change-Id: Ic9e2ffe85ac770bb6e9245826013d3022d6feea0

8 years agoCKM: Unlock journald logs 90/43590/4
Krzysztof Jackiewicz [Fri, 10 Jul 2015 10:27:30 +0000 (12:27 +0200)]
CKM: Unlock journald logs

[Problem] Journald logging fails after dropping root privileges and changing
the label.
[Solution] Change execute label to User so that sockets created by ckm-tests
are allowed to wx to System. Add permissions for custom label to wx to System::Run.

[Verification] Run ckm-tests and check journald logs for smack messages. There
should be none.

Change-Id: I8ddca950755f3b7079ae42fba4416b506ea9e35e

8 years agoCKM: Add tests for missing observer in encryption API 06/43506/4
Krzysztof Jackiewicz [Thu, 9 Jul 2015 16:09:30 +0000 (18:09 +0200)]
CKM: Add tests for missing observer in encryption API

[Problem] There's no test for missing observer in encryption API tests.
[Solution] Tests added

[Verification] Run ckm-tests --group=CKM_ENCRYPTION_DECRYPTION --regexp=no_observer_async

Change-Id: I5f9930f6f23e6959f16f81756dfe55c75e1a2d35

8 years agoCKM: Implement asynchronous tests for encryption/decryption 02/43502/5
Krzysztof Jackiewicz [Thu, 9 Jul 2015 12:20:03 +0000 (14:20 +0200)]
CKM: Implement asynchronous tests for encryption/decryption

[Feature] Encryption/decryption API implementation
[Solution] Add asynchronous environment to existing encryption/decryption tests

[Verification] Run ckm-tests --group=CKM_ENCRYPTION_DECRYPTION

Change-Id: I1ff9b89b45c643a95521381d676349a3c2408a22

8 years agoCKM: Extend test framework with multiple environment testing 01/43501/3
Krzysztof Jackiewicz [Wed, 8 Jul 2015 11:18:34 +0000 (13:18 +0200)]
CKM: Extend test framework with multiple environment testing

[Problem] It's impossible to execute the same test in different environments.
[Solution] Add support for running the same test in multiple environments.

[Verification] Test with next commit

Change-Id: I8ad04d1d28364026f63cb2c5f44bad87e7b4343b

8 years agoCKM: Add tests for encryption/decryption 05/39705/28
Krzysztof Jackiewicz [Thu, 21 May 2015 09:05:35 +0000 (11:05 +0200)]
CKM: Add tests for encryption/decryption

[Problem] No tests for encryption/decryption
[Solution] Tests added

[Verification] Run test: ckm-test --group=CKM_ENCRYPTION_DECRYPTION

Change-Id: I4a50ccccf692d8dd211247951bfd30fb892e898d

8 years agoCKM: Add test for empty certificate in getCertificateChain 21/42821/2
Krzysztof Jackiewicz [Thu, 2 Jul 2015 14:09:13 +0000 (16:09 +0200)]
CKM: Add test for empty certificate in getCertificateChain

[Problem] No test checking getCertificateChain behavior with empty certificate.
[Solution] Tests added.

[Verification] Run ckm-tests --regexp=T13122_get_chain_empty_cert &&
ckm-tests --regexp=T13121_get_chain_no_cert

Change-Id: I1b64facec253d4ec57d0955ef5e441c3ba958012

8 years agoadd test cases for libwebappenc 23/44523/2
Dongsun Lee [Thu, 23 Jul 2015 03:24:23 +0000 (12:24 +0900)]
add test cases for libwebappenc

Change-Id: I2e433293c2566ecbaefd237e8e60a6e2dcf67a6e
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoCKM: Add C compilation test 83/42483/5
Krzysztof Jackiewicz [Mon, 29 Jun 2015 09:20:46 +0000 (11:20 +0200)]
CKM: Add C compilation test

[Problem] All tests are compiled using C++ so we can't detect C-compiler errors
[Solution] Add C compilation test.

[Verification] Successfull compilation.

Change-Id: I650a464fef6ea1874201c2e53a4086fba6188e13

8 years agoCKM: Add invalid param ocsp tests 93/42893/1
Krzysztof Jackiewicz [Fri, 3 Jul 2015 14:38:10 +0000 (16:38 +0200)]
CKM: Add invalid param ocsp tests

[Problem] Not enought input param tests for ocsp API.
[Solution] New tests addded.

[Verification] Run ckm-tests --regexp=ocsp_check

Change-Id: I982c3e0c47500eb332e46d1027870d487603baf7

8 years agoCKM: Prevent exceptions in gc. Fix buffer comparison. 86/41986/5
Krzysztof Jackiewicz [Fri, 19 Jun 2015 12:34:14 +0000 (14:34 +0200)]
CKM: Prevent exceptions in gc. Fix buffer comparison.

[Problem] Garbage collector destructor may throw exceptions. Buffers can be
different even if sizes match.
[Solution] Destructor protected with try catch. Buffer comparison fixed.

[Verification] Run tests

Change-Id: Iae33de10ee9e9b2bde6aa427a4f17b49eed6955e

8 years agoCKM: add AES key manipulation tests. 95/38195/10
Maciej J. Karpiuk [Thu, 9 Apr 2015 12:43:46 +0000 (14:43 +0200)]
CKM: add AES key manipulation tests.

Change-Id: I282a9201be1acc1013f010651c7c89c682d01ee2

8 years agoCKM: Additional assert for smack_new_label_from_self 34/40234/9
Krzysztof Jackiewicz [Mon, 1 Jun 2015 09:04:05 +0000 (11:04 +0200)]
CKM: Additional assert for smack_new_label_from_self

[Problem] Label was not checked against NULL
[Solution] Check added

[Verification] Succesfull compilation + tests

Change-Id: I19cbc6b8f7dfe3dc094b9398215aa370c50ae327

8 years agoCKM: Remove logs to suppress smack errors 08/41308/1
Krzysztof Jackiewicz [Fri, 12 Jun 2015 09:45:21 +0000 (11:45 +0200)]
CKM: Remove logs to suppress smack errors

[Problem] Smack is complaining about denied access to /etc/dlog/platformlog.conf
which is caused by using dlog logs in tests.
[Solution] Existing logs are not important and have been removed.

[Verification] Run tests and check journalctl for smack errors. There should be
none.

Change-Id: Id46305b9cf0aae0029315a11a02fb68ff6700d57

8 years agoAdd tests for cynara-creds-socket 35/30435/12
Aleksander Zdyb [Thu, 5 Mar 2015 13:26:13 +0000 (14:26 +0100)]
Add tests for cynara-creds-socket

Change-Id: I9b4fe70b74424e6b1d70f12751ca87f0896b6f55

8 years agoCKM: Update common test utilities 04/39704/9
Krzysztof Jackiewicz [Thu, 21 May 2015 09:03:54 +0000 (11:03 +0200)]
CKM: Update common test utilities

[Problem] Utility functions should be accessible to other test suites.
Assert helpers don't show error name.
[Solution] Utilities moved to common file. Helpers updated.

[Verification] Run all tests.

Change-Id: I70d6239c0304284735496007500f18e348e14a51

8 years agoCKM: Add tests for algorithm parameters CAPI 64/39664/14
Krzysztof Jackiewicz [Wed, 20 May 2015 11:47:51 +0000 (13:47 +0200)]
CKM: Add tests for algorithm parameters CAPI

[Cause] No tests for algorithm params
[Solution] Tests added

[Verification] Run ckm-tests --group=CKM_ALGO_PARAMS

Change-Id: I609b62f035fdf89d2691e299b8d92c3580869f01

8 years agoCKM: Add asserts for file copying 09/40809/4
Krzysztof Jackiewicz [Tue, 9 Jun 2015 08:26:25 +0000 (10:26 +0200)]
CKM: Add asserts for file copying

[Problem] If you manually remove contents of /opt/data/ckm/ initial-values
tests will fail because the target directory does not exist.
[Solution] Add asserts checking if input & output files are correct.

[Verification] Remove /otp/data/ckm/initial_values. Run:
ckm-tests --group=T60_INITIAL_VALUES. They should fail. Reinstall key-manager
run tests again. All should pass.

Change-Id: Ib6b7308747b74943ec9d7274284d1d56c9be1641

8 years agoCKM: Run async api tests in single process 08/40808/3
Krzysztof Jackiewicz [Tue, 9 Jun 2015 08:06:52 +0000 (10:06 +0200)]
CKM: Run async api tests in single process

[Problem] Timeouts during key generation. Test dependency.
[Solution] Single process test cases used. Test env fixed.

[Verification] Run tests.

Change-Id: I471c1003403f6638aa836d47b42f3c1e06952e7e