platform/core/security/device-certificate-manager.git
13 months agoReturn different error if backend call fails 94/289694/7 e2ee
Krzysztof Jackiewicz [Mon, 13 Mar 2023 14:46:39 +0000 (15:46 +0100)]
Return different error if backend call fails

DCM_ERROR_INVALID_PARAMETER seems more appropriate than
DCM_ERROR_NO_DATA. It's triggered e.g. when incompatible digest type is
passed as an argument.

Change-Id: I1957464c9ae4789a4c7a4d4532687f8d66d0c1a5

13 months agoE2EE signing implementation 27/289427/10
Krzysztof Jackiewicz [Tue, 7 Mar 2023 10:42:32 +0000 (11:42 +0100)]
E2EE signing implementation

Tests updated.

Change-Id: I61790de9a3914c3bea846e9060360c16969e65c6

13 months agoE2EE bundle API test 72/289372/7
Krzysztof Jackiewicz [Mon, 6 Mar 2023 18:30:44 +0000 (19:30 +0100)]
E2EE bundle API test

Change-Id: I84751e9ea417aedc06520af66c1208d76c4e091d

14 months agoAlign E2EE API with existing one 26/289426/1
Krzysztof Jackiewicz [Tue, 7 Mar 2023 10:41:15 +0000 (11:41 +0100)]
Align E2EE API with existing one

Change-Id: I9f6356fe50d56860fbdb0bd2f24ad104beb1b323

14 months agoE2EE API draft
Krzysztof Jackiewicz [Tue, 17 Jan 2023 09:54:54 +0000 (10:54 +0100)]
E2EE API draft

- E2EE bundle concept
- E2EE signatures

Change-Id: I5caf98d6d976752d009f56c090d442e2f9aecbf2

15 months agoFix heap-use-after-free found by AddressSanitizer 95/287195/1
Dariusz Michaluk [Tue, 24 Jan 2023 15:03:14 +0000 (16:03 +0100)]
Fix heap-use-after-free found by AddressSanitizer

Change-Id: I7b0b0751e0c345d6424cd458e55330e6a5013339

2 years agoFix test08_dcm_ext_api_no_privilege for sdb shell 25/259425/1
Konrad Lipinski [Mon, 7 Jun 2021 16:14:49 +0000 (18:14 +0200)]
Fix test08_dcm_ext_api_no_privilege for sdb shell

... By switching to the System::Privileged smack label for the duration.
The label is required for the test to work due to the way cynara rules
are set up on the emulator.

Change-Id: If5bdca2f86b770f7d59de4b8b85d3c8c5aed3379

2 years agoAdd more tests for shared and dcm api. 51/259151/6
Michał Szaknis [Fri, 28 May 2021 13:19:39 +0000 (15:19 +0200)]
Add more tests for shared and dcm api.

Change-Id: I3f8afc27b66679196089c2432a9a5bb0b6c29698

3 years agoAdd API tests for new DCM EXT API 03/256103/9 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/6.5/unified/20211028.123926 accepted/tizen/7.0/unified/20221110.060250 accepted/tizen/7.0/unified/hotfix/20221116.105531 accepted/tizen/unified/20210422.005302 submit/tizen/20210419.104558 submit/tizen/20210421.104924 submit/tizen_6.5/20211028.162401 tizen_6.5.m2_release tizen_7.0_m2_release
Tomasz Swierczek [Mon, 29 Mar 2021 09:09:01 +0000 (11:09 +0200)]
Add API tests for new DCM EXT API

Change-Id: If68e66bd129cc0d567979243c743a5fbab640a21

3 years agoAdd server-side logic for EXT API calls 64/255964/15
Tomasz Swierczek [Thu, 25 Mar 2021 14:29:49 +0000 (15:29 +0100)]
Add server-side logic for EXT API calls

The implementation tries to call specialized backend API functions
as defined in the EXT API header.

Change-Id: I9554dbb114e2627fcde8190279076bf77b2f561e

3 years agoChange verification of privileges 63/255963/9
Tomasz Swierczek [Thu, 25 Mar 2021 13:18:55 +0000 (14:18 +0100)]
Change verification of privileges

Now, the privileges are checked depending on the message
type received.

This implementation requires DCM daemon to receive
& deserialize the message 1st before checking client privileges.

This is required by the introduction of DCM EXT API which can be guarded
by specific privilege (or none) for each backend method.

Change-Id: Iaaae1bc220e497f2488d8d2700a5334fa14b61b6

3 years agoAdd client-side logic of DCM ext API 49/254649/15
Tomasz Swierczek [Fri, 5 Mar 2021 13:51:19 +0000 (14:51 +0100)]
Add client-side logic of DCM ext API

Change-Id: I2f1c806122118534adf634f5b3dbea958fc295bd

3 years agoAdd stub implementation of DCM ext API in client library 48/254648/11
Tomasz Swierczek [Fri, 5 Mar 2021 12:13:19 +0000 (13:13 +0100)]
Add stub implementation of DCM ext API in client library

Since this commit, clients can link with new DCM ext API
library (SO file is properly provided).

Current implemenation of ext client API just returns error.

Change-Id: If07f0714a2497d84ed1673d2ce2ded05c541ea48

3 years agoAdd definitions of the new DCM ext API 59/254559/11
Tomasz Swierczek [Thu, 4 Mar 2021 10:19:46 +0000 (11:19 +0100)]
Add definitions of the new DCM ext API

New API is supposed to give DCM backends possibility
to define any custom method guarded with a Cynara privilege.

New API is not mandatory for plugins - plugins can implement
old, new, or both APIs of DCM.

This commit makes header files available for both: client
and the backend.

The DCM EXT error codes are defined in separate header
for easier management of errors returned from the daemon
to client.

Change-Id: Ia3478d1352f6eabfa913a975f7ee09c02b976939

3 years agoFix coverage generation in rpm 4.14.1 91/254491/1
Tomasz Swierczek [Wed, 3 Mar 2021 13:57:17 +0000 (14:57 +0100)]
Fix coverage generation in rpm 4.14.1

Debug source package directories now have different names.

Change-Id: I9b7accddcb51d5ec2c981c739c18513a3923dca8

3 years agoChange systemd-devel package name 97/252897/1 accepted/tizen/unified/20210210.130309 submit/tizen/20210209.101918
INSUN PYO [Wed, 3 Feb 2021 04:29:51 +0000 (13:29 +0900)]
Change systemd-devel package name

Change-Id: Id9784f8af33ebde4e3f4e73c8e33c49f0c06b260

3 years agoFix a feature string not to look like a link 48/250148/1
Dongsun Lee [Mon, 21 Dec 2020 07:34:13 +0000 (16:34 +0900)]
Fix a feature string not to look like a link

Change-Id: I282aee68f142a515c59d21af37138832efa22851
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
3 years agoAdd colour log formatter 42/248442/1
Dariusz Michaluk [Thu, 26 Nov 2020 12:14:05 +0000 (13:14 +0100)]
Add colour log formatter

Change-Id: Ic308c495a96c869542a644bc3b9b07f7dd394d41

3 years agoAutomate code coverage measurement - adjustment 01/243501/6
Dariusz Michaluk [Mon, 7 Sep 2020 14:12:56 +0000 (16:12 +0200)]
Automate code coverage measurement - adjustment

To gather unit tests coverage report:
- use COVERAGE build_type,
- instal device-certificate-manager-coverage rpm,
- run device-certificate-manager-coverage.sh script.

Change-Id: Ia196db4dcfbcc0801b01301cbdd2f71d989e4dfc

3 years agoAdd error checking of boost::asio::[read|write] functions 76/243976/4
Tomasz Swierczek [Fri, 11 Sep 2020 12:15:21 +0000 (14:15 +0200)]
Add error checking of boost::asio::[read|write] functions

Acc. to documentation (https://www.boost.org/doc/libs/1_60_0/boost/asio/read.hpp),
the write function should throw an error when there is a problem in reading.

Similarly, read returns number of written bytes which should be checked.

Change-Id: I301ccd4e12661f486362a9b58f7cdd8711c9112d

3 years agoFix stopping service when no requests 22/240122/3 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.114853 accepted/tizen/6.0/unified/hotfix/20201103.003400 accepted/tizen/unified/20200820.133548 submit/tizen/20200806.130513 submit/tizen/20200818.093042 submit/tizen_6.0/20201029.205104 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 tizen_6.0.m2_release
Dariusz Michaluk [Tue, 4 Aug 2020 12:51:18 +0000 (14:51 +0200)]
Fix stopping service when no requests

Calling DCM without privilege caused session counter overflow,
which turns into stoping service while new sessions are proceed
and finally segfault.

Change-Id: If28e52aa5283978cc34ac9cdb8d7e42e2e2a5496

3 years agoAdd sources to tests binary instead linking to client library 00/237700/2 accepted/tizen/unified/20200728.135420 submit/tizen/20200728.071123
Dariusz Michaluk [Thu, 2 Jul 2020 11:24:45 +0000 (13:24 +0200)]
Add sources to tests binary instead linking to client library

Change-Id: I6a166edbb09ef7ec91829abb110e354b096ef784

3 years agoAutomate code coverage measurement 57/233857/13
Dariusz Michaluk [Tue, 19 May 2020 14:50:46 +0000 (16:50 +0200)]
Automate code coverage measurement

Change-Id: Iedf2495b640d4f703f9b63dad934af7d42f9adc2

3 years agoRemove KSE backend from README 63/237263/3
Dariusz Michaluk [Fri, 26 Jun 2020 09:49:21 +0000 (11:49 +0200)]
Remove KSE backend from README

Konai Secure Element is not supported anymore.

Change-Id: I8ea3d98def32f18852732119d650376feb23c4d7

3 years agoRemove mbedtls dependency 98/236698/7
Dariusz Michaluk [Fri, 19 Jun 2020 10:14:56 +0000 (12:14 +0200)]
Remove mbedtls dependency

mbedtls is a part of a big iotivity project,
which is not used on a product sometimes.

Change-Id: Ie73a5967d68103a6ace27c010c6274cb1c22d052

3 years agoBackend API requires protobuf-lite instead of iotivity 10/236510/7
Dariusz Michaluk [Wed, 17 Jun 2020 15:19:19 +0000 (17:19 +0200)]
Backend API requires protobuf-lite instead of iotivity

Change-Id: I8d420c7e67262b7551a395d733c92cce9c86dad8

3 years agoRefactor dcm-deamon code 52/235452/10
Dariusz Michaluk [Thu, 4 Jun 2020 12:39:07 +0000 (14:39 +0200)]
Refactor dcm-deamon code

- remove service_adapter class
- code formatting changes
- cleanup soresolver, dcm_session, dcm_server classes

Change-Id: I3a464c524ce6a3e17f0769f12c7a9abdd66e119d

3 years agoRemove boost-log dependency 17/235317/10
Dariusz Michaluk [Tue, 2 Jun 2020 22:44:10 +0000 (00:44 +0200)]
Remove boost-log dependency

Some parts of code use dlog and some boost-log macros,
boost-log has configured dlog as a backend, so we can
unify logging mechanism and remove boost-log dependency.

Change-Id: I4da5688a705eaa307206b0f20b1e9003a3793dd5

3 years agoRefactor dcm-client code 12/235012/11
Dariusz Michaluk [Mon, 1 Jun 2020 08:39:26 +0000 (10:39 +0200)]
Refactor dcm-client code

- remove dcm_client_connection_impl class
- code formatting changes
- added new error return values in some functions

Change-Id: I1db0ab5645d8c10e281e727f4c0c4a5530da0802

3 years agoAdd macros adding NEGATIVE_ or POSITIVE_ prefix to test name 28/233728/15
Dariusz Michaluk [Mon, 18 May 2020 13:29:37 +0000 (15:29 +0200)]
Add macros adding NEGATIVE_ or POSITIVE_ prefix to test name

Change-Id: I3f0681ed8697b301b061778cb9e4babb81c5ab30

3 years agoAdd one boost-based binary with all tests 83/234783/9
Dariusz Michaluk [Thu, 28 May 2020 13:42:11 +0000 (15:42 +0200)]
Add one boost-based binary with all tests

Change-Id: I23e3cf160e2e4fdf0f7dd95dafd366a0a35babd4

3 years agoMove all sources to src/ directory 78/234778/9
Dariusz Michaluk [Thu, 28 May 2020 12:20:57 +0000 (14:20 +0200)]
Move all sources to src/ directory

Change-Id: I0ffe64f5cc8b3591d1951503f46011173f173ab3

3 years agoMove example app to documentation 77/234777/9
Dariusz Michaluk [Thu, 28 May 2020 11:55:34 +0000 (13:55 +0200)]
Move example app to documentation

Change-Id: I73832e912bc78ed55c9a4a57550b76173f06d861

3 years agoSet project version in one place only 76/234776/9
Dariusz Michaluk [Thu, 28 May 2020 10:53:12 +0000 (12:53 +0200)]
Set project version in one place only

Change-Id: I4e39f86e922f650c611ce41683dc6e16f77dc83b

3 years agoChange code formatting in shared/protobuf_asio 74/234774/8
Dariusz Michaluk [Thu, 28 May 2020 09:40:20 +0000 (11:40 +0200)]
Change code formatting in shared/protobuf_asio

Change-Id: I1fb44ed5992955dc18f340407fccdfc2169a518a

3 years agoSupport C API only, hide C++ symbols 53/234653/9
Dariusz Michaluk [Wed, 27 May 2020 21:00:32 +0000 (23:00 +0200)]
Support C API only, hide C++ symbols

Change-Id: I9977834917c6d28b99fa34fc22150f1b221b4f5e

3 years agoRemove unneeded spec dependencies 52/234652/7
Dariusz Michaluk [Wed, 27 May 2020 20:02:33 +0000 (22:02 +0200)]
Remove unneeded spec dependencies

Change-Id: I46756d3749085a16fa843da57698a37678ad6ba3

3 years agoRewrite cmake infrastructure 34/234234/10
Dariusz Michaluk [Tue, 26 May 2020 12:09:00 +0000 (14:09 +0200)]
Rewrite cmake infrastructure

Change-Id: Ic5a94dc9c188e5e26a6b0c42647c77f03ab2d59e

3 years agoRemove interprocedural optimization flags 45/234645/7
Dariusz Michaluk [Wed, 27 May 2020 12:36:28 +0000 (14:36 +0200)]
Remove interprocedural optimization flags

Change-Id: Ie87b2d481a9e5442e1c146e4c75667b8127ed589

3 years agoSystemd is always available 59/234459/7
Dariusz Michaluk [Tue, 26 May 2020 10:35:01 +0000 (12:35 +0200)]
Systemd is always available

DCM is not used outside Tizen,
we can rely on systemd being always available.

Additionally not used boost::filesystem dependency was removed.

Change-Id: I61d932dfe9481f8345b3c36f4f5dc7390770260e

3 years agoCynara framework is always available 58/234458/7
Dariusz Michaluk [Tue, 26 May 2020 09:52:49 +0000 (11:52 +0200)]
Cynara framework is always available

DCM is not used outside Tizen,
we can rely on cynara framework being always available.

Change-Id: Ib5e4bdeccf9a99b1dbfd935e3d5b2f32eae5877f

3 years agoReplace protobuf with protobuf-lite 39/233939/10
Dariusz Michaluk [Wed, 20 May 2020 11:47:11 +0000 (13:47 +0200)]
Replace protobuf with protobuf-lite

The "lite" library is much smaller than the full library,
and is more appropriate for resource-constrained systems such as mobile phones.

Change-Id: I4625bc971cdb509ce5a22ca2b5d98bcba69ac46a

3 years agoFix installation paths 29/234429/7
Dariusz Michaluk [Tue, 26 May 2020 07:49:10 +0000 (09:49 +0200)]
Fix installation paths

This commit allows build/install without GBS.

Change-Id: Ie80a0baa50b868db01c7d00faad82a91de996ddf

3 years agoRemove unneeded compilation flags 16/234416/9
Dariusz Michaluk [Tue, 26 May 2020 07:39:26 +0000 (09:39 +0200)]
Remove unneeded compilation flags

gcc 9 was complaining about out-of-bounds accesses in auto-generated
boost 1.66 code, since boost was upgraded to 1.71 version,
these flags are unnecessary.

Change-Id: Ifadd67f82129a00229b1b07233093ea31f7c821d

3 years agoRemove unused openssl dependency 13/234413/9
Dariusz Michaluk [Tue, 26 May 2020 07:31:05 +0000 (09:31 +0200)]
Remove unused openssl dependency

Change-Id: Ie28f2c12b2dea4be4e51aad425a330eed5e858c2

3 years agoDlog logging framework is always available 10/234410/9
Dariusz Michaluk [Tue, 26 May 2020 07:13:00 +0000 (09:13 +0200)]
Dlog logging framework is always available

DCM is not used outside Tizen, we can use Tizen dlog framework.

In the future commits, all BOOST_LOG_* macros
should be replaced with unified logging mechanism.

Change-Id: Ibc4c9287925268c99c62c386a8ebbc9688b941a5

3 years agoSimplify compile flags settings 27/233727/7
Dariusz Michaluk [Mon, 18 May 2020 12:49:46 +0000 (14:49 +0200)]
Simplify compile flags settings

Set C++14 and C11 as default. Add release & debug flags.

Change-Id: I1706cc8581d33f53362a557162c6e5d9bf5dddf5

3 years agoBoost unit test framework is always available 35/234335/8
Dariusz Michaluk [Mon, 25 May 2020 10:54:30 +0000 (12:54 +0200)]
Boost unit test framework is always available

Boost is widely used framework, we can assume that
unit test component is always available.
Additionally test/CMakeLists.txt file was rewritten a bit.

Change-Id: I0efba0b1e042cd8f87d327f3ad15d3bccb7fdb78

3 years agoRemove boost-based cmd line program options 04/234304/9
Dariusz Michaluk [Mon, 25 May 2020 09:06:13 +0000 (11:06 +0200)]
Remove boost-based cmd line program options

Available options were 'version' and 'help' only.
Checking package metadata (change-id) on platform image can be used instead.

Change-Id: I4861509f5983db6a8fcd3d3f0a615017129a7df8

3 years agoRemove mbedtls dependency from daemon 67/236367/4
Dariusz Michaluk [Tue, 16 Jun 2020 09:23:58 +0000 (11:23 +0200)]
Remove mbedtls dependency from daemon

Input validation was done on client side,
mbedtls error code replaced with system error.

Change-Id: Ie1bb4fd09079c37387a70cbcef897496c4644793

3 years agoRemove certificate chain utilities 66/236366/4
Dariusz Michaluk [Tue, 16 Jun 2020 08:50:49 +0000 (10:50 +0200)]
Remove certificate chain utilities

Reordering of certificate chain is not the role of dcm-daemon.
dcm-backend must return a certificate chain with correct order.

Change-Id: Id6d4adfa9c17d3f05501966c40e5dbf82eca40db

3 years ago[Protobuf] Use ByteSizeLong() instead of deprecated ByteSize() 84/237784/1 accepted/tizen/unified/20200707.140958 submit/tizen/20200703.080932
Sangjung Woo [Fri, 3 Jul 2020 10:11:35 +0000 (19:11 +0900)]
[Protobuf] Use ByteSizeLong() instead of deprecated ByteSize()

After bumping up to protobuffer v3.12.3, a below compile-time error
occurs.

* error: 'int google::protobuf::MessageLite::ByteSize() const' is
deprecated: Please use ByteSizeLong() instead [-Werror=deprecated-declarations]

In order to fix this bug, this patch uses the ByteSizeLong() instead of
deprecated ByteSize().

Change-Id: I8bd6c9eb951521af1ae08ff60c7bb81cf8f2c0cd
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
4 years agoAdd gcc 9 fixes 76/222476/2 accepted/tizen/unified/20200116.101857 submit/tizen/20200115.081508
Tomasz Swierczek [Wed, 15 Jan 2020 08:06:37 +0000 (09:06 +0100)]
Add gcc 9 fixes

Gcc 9 complais about out-of-bounds items in auto-generated source code

Change-Id: I20c4378bc5cb5b21c467cc7ca1f8fe4dc158e26f

4 years agoFix buig in link address 82/220082/2
Dongsun Lee [Fri, 13 Dec 2019 02:38:58 +0000 (11:38 +0900)]
Fix buig in link address

Change-Id: Id39c443b80a80858c25a7e042e4b1bee9d9eb1b2
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
4 years agoChange developer.tizen.org to docs.tizen.org 67/220067/2
Dongsun Lee [Fri, 13 Dec 2019 01:49:45 +0000 (10:49 +0900)]
Change developer.tizen.org to docs.tizen.org

Change-Id: I5ef281d4c9c600ecc4ce19b75c435a8b224580bc
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
4 years agoFix build failure in case of boost upgrade(1.66.0->1.71.0) 79/219679/1 accepted/tizen/unified/20191212.123713 submit/tizen/20191211.031516
Dongsun Lee [Mon, 9 Dec 2019 06:51:30 +0000 (15:51 +0900)]
Fix build failure in case of boost upgrade(1.66.0->1.71.0)

Change-Id: Ia5a0688c7712ead820fae1e5231eeb11fc3fde43
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
4 years agoMoved boost_log_dlog_sink.h to dcm-daemon subdirectory 05/214505/2
Tomasz Swierczek [Mon, 23 Sep 2019 10:26:37 +0000 (12:26 +0200)]
Moved boost_log_dlog_sink.h to dcm-daemon subdirectory

This file is not re-used between client & daemon.
This change should improve SAM score.

Change-Id: I6826839da1e37cf9d85813e7de7a13dcc651cf85

4 years agoFix build break for the x86_64 architecture 04/209304/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.022416 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090238 accepted/tizen/5.5/unified/wearable/hotfix/20201027.112930 accepted/tizen/unified/20190705.041552 submit/tizen/20190704.143713 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 submit/tizen_5.5_wearable_hotfix/20201026.184304 tizen_5.5.m2_release
Pawel Kowalski [Thu, 4 Jul 2019 14:17:02 +0000 (16:17 +0200)]
Fix build break for the x86_64 architecture

In printf function, types of printed variables were adjusted.

Change-Id: I3fda0b37dc6d29338eced9415cd983c58756499c

4 years agoAdd additional GCC definitions for more warnings 07/208807/2 submit/tizen/20190704.134431
Tomasz Swierczek [Fri, 28 Jun 2019 12:28:31 +0000 (14:28 +0200)]
Add additional GCC definitions for more warnings

Removed new warnings/fixed raised issues too.

Change-Id: I44fd371d85ded5335874c4ecb707787c0cab6f1d

4 years agoFix compilation warnings 26/208726/1
Tomasz Swierczek [Thu, 27 Jun 2019 11:38:24 +0000 (13:38 +0200)]
Fix compilation warnings

Change-Id: Iaf31217dc685ca339e75ead1cfd8a5e0f7afd02a

4 years agoAdd the README.md file 82/207982/3
Pawel Kowalski [Fri, 14 Jun 2019 07:49:09 +0000 (09:49 +0200)]
Add the README.md file

Change-Id: I54ed9ddcceba5aeb032945344c6c76a19937c186

4 years agoMigrate to openssl1.1 90/207990/1
Pawel Kowalski [Fri, 14 Jun 2019 13:02:38 +0000 (15:02 +0200)]
Migrate to openssl1.1

Change-Id: I6082cd4b30ae68264f5ba5524d671c07155bf4b1

4 years agoSimplify dllresolver caching & actually use it 49/207349/3
Tomasz Swierczek [Mon, 3 Jun 2019 11:56:25 +0000 (13:56 +0200)]
Simplify dllresolver caching & actually use it

Change-Id: I8e6f0e18984fc8106ac48f35178e6550b91c74d8

4 years agoMove backends to the separate repository 85/204585/10 accepted/tizen/unified/20190613.112243 submit/tizen/20190613.063812
Pawel Kowalski [Wed, 24 Apr 2019 12:34:11 +0000 (14:34 +0200)]
Move backends to the separate repository

The plugin architecture was implemented. From this commit, the backends
are loaded using the dlopen. They are libs that provide the internal
common API for requesting the certificate chain and signing the data.
The implementation depends on the device used. Also the dummy backend
may be used.
The backends are available in the repository:
platform/core/security/device-certificate-manager-backend.

Change-Id: Id69b8763e2997c3d0f3747aafd0d6cd9eeaa9d5c

5 years agoAdd KONAI SE plugin 43/204243/5 accepted/tizen/unified/20190426.110502 submit/tizen/20190425.235759
Dongsun Lee [Mon, 22 Apr 2019 08:34:53 +0000 (17:34 +0900)]
Add KONAI SE plugin

Change-Id: I1fb423ae44f5df1dad3bf3fadfd7e8e6fd308875
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
5 years agoLOG_TAG names unification, use DCM_SERVER/DCM_CLIENT. 50/203950/1
Dariusz Michaluk [Thu, 18 Apr 2019 08:02:59 +0000 (10:02 +0200)]
LOG_TAG names unification, use DCM_SERVER/DCM_CLIENT.

Change-Id: I4b66931e10dd22a508c88f46f3d31a231fe38bdf

5 years agopackaging: do not hardcode protobuf package soname. 24/202224/1
MyungJoo Ham [Tue, 26 Mar 2019 06:25:36 +0000 (15:25 +0900)]
packaging: do not hardcode protobuf package soname.

Protobuf is way too old and is being upgraded.
The version name is to be changed.

Change-Id: I6d9f102ee7ab264d4822ce637afabd00dec51897
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
5 years agoAdjust build to new dlog 00/195700/2 accepted/tizen/unified/20181221.125519 submit/tizen/20181221.044129
Tomasz Swierczek [Mon, 17 Dec 2018 09:14:04 +0000 (10:14 +0100)]
Adjust build to new dlog

Change-Id: I91b4fc5045c7ca4b10b44fd6e364206e7c6c2640

5 years agoFix C++Test defects 08/193808/2 accepted/tizen/unified/20181204.063807 submit/tizen/20181204.022314 submit/tizen/20181204.042208
Dariusz Michaluk [Mon, 26 Nov 2018 10:59:29 +0000 (11:59 +0100)]
Fix C++Test defects

Destructor in a class 'dcm_client_connection' should be public and virtual or protected and nonvirtual
Unreachable code detected after 'switch' statement

Change-Id: I6fe82c3bb231691b693e13f964c8ddc34cf26a78

5 years agoFix SVACE defects 59/192059/4
Dariusz Michaluk [Mon, 29 Oct 2018 10:16:05 +0000 (11:16 +0100)]
Fix SVACE defects

Change-Id: I03562c56c60d3df9c5401c4d9e55f8f1342df8c0

5 years agoMinor fixes and improvements 20/187820/2
Dariusz Michaluk [Tue, 28 Aug 2018 14:07:13 +0000 (16:07 +0200)]
Minor fixes and improvements

- start device-certificate-manager service on demand,
- stop device-certificate-manager when no requests,
- cleanup security manifests,
- unify socket path,
- remove unused build variables,
- add boost-test dependency,
- unify service/socket names,
- restart/stop service/socket together,
- remove device-certificate-manager target.

Change-Id: Iade35e34a143300ba07c5958003dad53758f7f8e

5 years agoFix Build Warning 60/190560/1 accepted/tizen_5.0_unified accepted/tizen/5.0/unified/20181102.021828 accepted/tizen/unified/20181005.012454 submit/tizen/20181004.012642 submit/tizen_5.0/20181101.000004
Dongsun Lee [Thu, 4 Oct 2018 01:23:48 +0000 (10:23 +0900)]
Fix Build Warning

Change-Id: Ie5e737100aaa44a72d75376b69a15a0325bdd62e
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
5 years agoFix SVACE defects 44/188944/2 accepted/tizen/unified/20180912.153358 submit/tizen/20180912.045643 submit/tizen/20180912.073953
Dongsun Lee [Wed, 12 Sep 2018 04:14:00 +0000 (13:14 +0900)]
Fix SVACE defects

- 325773 : ignoring return value of 'fread', declared with attribute warn_unused_result
- 347249 : format '%ld' expects argument of type 'long int'

Change-Id: I8ec62253afb4649cc7d8a4c810bcba5b5b03ad84
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
5 years agoAdd Apache 2.0 license headers 34/187134/1
Pawel Kowalski [Mon, 20 Aug 2018 07:31:12 +0000 (09:31 +0200)]
Add Apache 2.0 license headers

Change-Id: I514199642ec446c7c33fe5ff3d4d2a8a132aebd3

5 years agoRelease 2.0.2 version accepted/tizen/unified/20180727.135726 submit/tizen/20180727.054149
Tomasz Swierczek [Fri, 27 Jul 2018 05:41:06 +0000 (07:41 +0200)]
Release 2.0.2 version

Change-Id: If733dc27827c1fe71316a08ad3425a32ee30f7c4

5 years agoAdd CMake options to build position-independent code (pie) 40/185140/1
Tomasz Swierczek [Thu, 26 Jul 2018 08:06:15 +0000 (10:06 +0200)]
Add CMake options to build position-independent code (pie)

Change-Id: I35a8635d7dd42d3fa801440dfc72691ad44201c9

5 years agoRelease 2.0.1 version 47/181547/1 accepted/tizen/unified/20180615.071855 submit/tizen/20180614.145730
Dariusz Michaluk [Thu, 14 Jun 2018 14:49:20 +0000 (16:49 +0200)]
Release 2.0.1 version

Change-Id: I5455988328e7c9d90b7b0e28ce1c0fd29714f940

5 years agoFix: replace strdup with memcpy 47/179947/2
Dariusz Michaluk [Wed, 23 May 2018 11:16:06 +0000 (13:16 +0200)]
Fix: replace strdup with memcpy

Change-Id: Ie8923d089b5cce03b5d9a354a7ed6d0a173fc509

5 years agoDCM API tests refactoring 57/180957/2
Dariusz Michaluk [Wed, 13 Jun 2018 13:13:00 +0000 (15:13 +0200)]
DCM API tests refactoring

Rename dcm_hw_api_test to dcm_api_test.
Remove RSA tests (not supported by device).
Fix warnings.

Change-Id: Id0143b229c3c371aadb7a30eef8d3bc209fdc430

6 years agoRelease 2.0 version 29/178029/1 accepted/tizen/unified/20180508.071556 submit/tizen/20180507.142604
Dariusz Michaluk [Mon, 7 May 2018 14:06:47 +0000 (16:06 +0200)]
Release 2.0 version

Change-Id: I8f7a6834aad1f21872051eb05a0173632d6d5d2d

6 years agoMake dcm APIs as public API 83/173783/10
Dongsun Lee [Mon, 26 Mar 2018 02:16:57 +0000 (11:16 +0900)]
Make dcm APIs as public API

Change-Id: I12dc1e3961f3842275c6cdcf54c0396bcec35a21
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
6 years agoSVACE fix for strerror 74/173174/1 accepted/tizen/unified/20180403.182342 submit/tizen/20180320.034537 submit/tizen/20180401.232214
Jaroslaw Pelczar [Mon, 18 Dec 2017 05:33:16 +0000 (06:33 +0100)]
SVACE fix for strerror

WID:39508479 Use of vulnerable function 'strerror' at
serviceadapter.cpp:99. strerror makes no guaranteee of thread safety.
Use strerror_r function instead.

Change-Id: I050aea535c0caddc4baebb945d70b29766255fe9
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
(cherry picked from commit 80a151491507a7dd8ffa4dca1064581026ba710f)

6 years agofix dependency error for libprotobuf9 80/166680/1 accepted/tizen/unified/20180112.073155 submit/tizen/20180111.111231
Dongsun Lee [Wed, 20 Dec 2017 00:31:12 +0000 (09:31 +0900)]
fix dependency error for libprotobuf9

Change-Id: Ie67771cbcd08487e835bf1581d72486a721533cc
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
(cherry picked from commit fa707323feafd524fd1c53440c8c9a198d6cf7b5)

6 years agoAdd libraries to Requires in spec file 77/166677/1
Dongsun Lee [Mon, 18 Dec 2017 07:12:08 +0000 (16:12 +0900)]
Add libraries to Requires in spec file

- protobuf and boost libraries are not loaded on tizen image by default.
- these libraries should be listed in Requires to load on tizen image with DCM.

Change-Id: Ie7ba34bfc5402610fcc472fc2fca4a9b581d13b0
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
(cherry picked from commit 3142cdd52fcfae16dedfa9d4dfd7012b70494467)

6 years agoFix systemd service script 88/164688/5 accepted/tizen/unified/20180104.064653 submit/tizen/20180103.101005
Jaroslaw Pelczar [Wed, 20 Dec 2017 08:37:37 +0000 (09:37 +0100)]
Fix systemd service script

This commit fixes service load error after installation and
service reload after reinstallation.

Change-Id: I8d66540028cd3eb78f9db9fe08992a9070685edb
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoUse new privilege for client 03/164503/2
Jaroslaw Pelczar [Tue, 19 Dec 2017 05:21:16 +0000 (06:21 +0100)]
Use new privilege for client

New privilege is required by server:
http://tizen.org/privilege/devicecertificate

Change-Id: I1c4a39ad201b8fefc9eabf0dc70f083d4014a33b
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoBump DCM release to 2 in spec 92/163992/2
Jaroslaw Pelczar [Thu, 14 Dec 2017 07:14:42 +0000 (08:14 +0100)]
Bump DCM release to 2 in spec

Change-Id: I38d4bfbb795042c8090109f72f73b7d9a1d0a6bf
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoMerge "Always rewrite certificate chain from backend" into tizen
Dong Sun Lee [Wed, 27 Dec 2017 05:21:51 +0000 (05:21 +0000)]
Merge "Always rewrite certificate chain from backend" into tizen

6 years agoMerge "Add test case for certificate rewriter" into tizen
Dong Sun Lee [Wed, 27 Dec 2017 05:20:19 +0000 (05:20 +0000)]
Merge "Add test case for certificate rewriter" into tizen

6 years agoMerge "Implement x509 certificate rewriter" into tizen
Dong Sun Lee [Wed, 27 Dec 2017 05:20:15 +0000 (05:20 +0000)]
Merge "Implement x509 certificate rewriter" into tizen

6 years agoAlways rewrite certificate chain from backend 91/163991/1
Jaroslaw Pelczar [Thu, 14 Dec 2017 06:37:18 +0000 (07:37 +0100)]
Always rewrite certificate chain from backend

Change-Id: Ia76a36d75a802a97f4cf58f8b4826504451e87bc
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoAdd test case for certificate rewriter 90/163990/1
Jaroslaw Pelczar [Thu, 14 Dec 2017 10:46:31 +0000 (11:46 +0100)]
Add test case for certificate rewriter

Change-Id: I10a3746c12ba922becb1e92b8e746d6c01b57338
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoImplement x509 certificate rewriter 89/163989/1
Jaroslaw Pelczar [Thu, 14 Dec 2017 06:30:47 +0000 (07:30 +0100)]
Implement x509 certificate rewriter

This class will rewrite broken x509 chains into correct order.

Change-Id: I58b7a312f39443d7740fcda2bef94b089ca24090
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoAdd some simple unit tests for hw_api 93/163493/1
Uladzislau Harbuz [Mon, 11 Dec 2017 13:47:36 +0000 (14:47 +0100)]
Add some simple unit tests for hw_api

Change-Id: If1fa9dfcec2afc437e00d2940378223c04ea6697

6 years agochange user/group from key-manager to security_fw 37/163437/2 accepted/tizen/4.0/unified/20171214.050336 accepted/tizen/4.0/unified/20171219.171734 accepted/tizen/unified/20171212.064720 submit/tizen/20171212.022906 submit/tizen_4.0/20171213.075947 submit/tizen_4.0/20171219.114031
Dongsun Lee [Mon, 11 Dec 2017 07:10:14 +0000 (16:10 +0900)]
change user/group from key-manager to security_fw

Change-Id: I8854d29a2ce01f3ba0460492b904ed0f05228744
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
6 years agoUse Cynara for access control 76/163276/1
Jaroslaw Pelczar [Tue, 5 Dec 2017 07:35:42 +0000 (08:35 +0100)]
Use Cynara for access control

Change-Id: I42e7aebfd0369301877e023ad5721547098b20df
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agodcm-client: remove debug level logs, leave only error logs 75/163275/1
Jaroslaw Pelczar [Tue, 5 Dec 2017 06:18:30 +0000 (07:18 +0100)]
dcm-client: remove debug level logs, leave only error logs

Change-Id: I65f9f68274c5407ed6f51df2db81ca8298233d9e
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years ago[cmake] Add missing include directory 74/163274/1
Jaroslaw Pelczar [Tue, 5 Dec 2017 05:43:59 +0000 (06:43 +0100)]
[cmake] Add missing include directory

Change-Id: I0d6be92ff596bee9eab05a0286b924335276ae33
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agohw_api_test: use random test data 73/163273/1
Jaroslaw Pelczar [Tue, 5 Dec 2017 05:37:32 +0000 (06:37 +0100)]
hw_api_test: use random test data

Also print data using boost::algorithm::hex

Change-Id: I57981550c4101e593916851073fa73f753f1a505
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoHandle valid case for hash_size==0 72/163272/1
Jaroslaw Pelczar [Tue, 5 Dec 2017 05:32:09 +0000 (06:32 +0100)]
Handle valid case for hash_size==0

If hash size is 0 then MD algorithm must not be NONE, in this
case hash_size is extracted from expected length for MD algorithm.
If MD algorithm is not NONE, then hash_size is validated against
the algorithm's expected input length.

Change-Id: Ib95d8138ce6a21c364a5d7f88910fde15e32a026
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>