platform/core/security/key-manager.git
8 years agoRemove tag to key-manager_doc.h 64/87864/1
Kyungwook Tak [Mon, 12 Sep 2016 01:25:47 +0000 (10:25 +0900)]
Remove tag to key-manager_doc.h

key-manager_doc.h is invisible for SDK user

Change-Id: I33195575d930ef51a54dc917138a0408d456cbc3
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoDAC change of .central-key-manager-api-control.sock to 770 to protect control functions 81/87481/1
Dongsun Lee [Thu, 8 Sep 2016 06:47:57 +0000 (15:47 +0900)]
DAC change of .central-key-manager-api-control.sock to 770 to protect control functions

Change-Id: I976f31bddf77946f62173a5670684a8fc56be857
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoFix SVACE defects: unsafe functions and dead code 16/87216/1
Kyungwook Tak [Wed, 7 Sep 2016 05:17:35 +0000 (14:17 +0900)]
Fix SVACE defects: unsafe functions and dead code

Change-Id: I1f670628bc6636e89ca9a7d9eae72922f062fd22
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd migrate script for removed cert-svc store API 87/87087/3
Kyungwook Tak [Tue, 6 Sep 2016 08:25:50 +0000 (17:25 +0900)]
Add migrate script for removed cert-svc store API

cert svc API in cert-service.h is removed and certificates saved by
those API could be used through key-manager API after certificates
migrated.
(related cert-svc commit:
    project  : platform/core/security/cert-svc
    commitid : 3f2d8b2afcbefa5d2668a08bcd2a3acd25ffe067)

For now added script only moves certs directory from old cert-svc path
to key-manager data directory. Reading those resources and save to
key-manager db when service loaded is TODO

Change-Id: I54019a31d8b7549a770d8acf0da8df28be6f99a6
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd temporary file suffix to gitignore 57/87057/1
Kyungwook Tak [Tue, 6 Sep 2016 06:58:41 +0000 (15:58 +0900)]
Add temporary file suffix to gitignore

Change-Id: Ifd75cbfc7c629059d1b6280efa38190fa627728d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoReturn incomplete PKCS12 with exportable parts only 37/86337/2
Krzysztof Jackiewicz [Wed, 31 Aug 2016 13:35:24 +0000 (15:35 +0200)]
Return incomplete PKCS12 with exportable parts only

[Problem] There's no way to get CA certificates list for PKCS12 with
non-exportable key.
[Solution] Create an incomplete PKCS12 structure with exportable fields only.

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

Change-Id: I77b7ef153fc5d7eb16a587a5bb0450c6a74f6ba1

8 years agoMove upgrade patchs to platform upgrade script dir 48/85448/1 accepted/tizen/common/20160829.135729 accepted/tizen/ivi/20160830.060821 accepted/tizen/mobile/20160830.060702 accepted/tizen/tv/20160830.060729 accepted/tizen/wearable/20160830.060753 submit/tizen/20160829.005907
Kyungwook Tak [Thu, 25 Aug 2016 06:48:09 +0000 (15:48 +0900)]
Move upgrade patchs to platform upgrade script dir

Platform upgrade script dir: /usr/share/upgrade/scripts

Change-Id: Ia705efe39ce537f42899761b5f2f2b08e3a52e05
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd deprecated attributes and logs 77/82577/6
Kyungwook Tak [Thu, 4 Aug 2016 08:47:03 +0000 (17:47 +0900)]
Add deprecated attributes and logs

Change-Id: I511f7dc4fc711f433ef23448badf468c8169afef
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove @see link to deprecated API 49/84549/1 accepted/tizen/common/20160822.132538 accepted/tizen/ivi/20160823.041019 accepted/tizen/mobile/20160823.040902 accepted/tizen/tv/20160823.040935 accepted/tizen/wearable/20160823.040958 submit/tizen/20160822.023804
Kyungwook Tak [Fri, 19 Aug 2016 07:35:49 +0000 (16:35 +0900)]
Remove @see link to deprecated API

ckmc_load_from_pkcs12_file is deprecated but @see links from other APIs
still exist.

Change-Id: I5c58cb8bbc1e1268f23ec09a828e66be581e3ddc
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoFix sha1 digest length and type mismatch(size_t and uint) 96/84396/4
Kyungwook Tak [Thu, 18 Aug 2016 10:07:24 +0000 (19:07 +0900)]
Fix sha1 digest length and type mismatch(size_t and uint)

Change-Id: Ia53c49ea40d225971a3061241ee90c58534eaf65
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years ago[CAPI added] ckmc_alias_new() 56/81856/6
Kyungwook Tak [Fri, 29 Jul 2016 00:24:49 +0000 (09:24 +0900)]
[CAPI added] ckmc_alias_new()

Make full alias with owner id and data alias (and separator between them)

Change-Id: I103d3ca0577c6847df65a402907b12b388a8e49e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoFix global-buffer-overflow in sqlcipher.c 98/83498/2
Yury Usishchev [Mon, 25 Jul 2016 07:41:31 +0000 (10:41 +0300)]
Fix global-buffer-overflow in sqlcipher.c

null-terminated string(pVfs->zName) has no assurance that the length
is longer than 10 so buffer-overflow can occured

Change-Id: I9dad1321ba2e8be4260feb33eb3874bb2c6cbb09
Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
8 years agoDeclare smack label on socket ipc in/out 23/81423/1
Kyungwook Tak [Tue, 26 Jul 2016 05:28:10 +0000 (14:28 +0900)]
Declare smack label on socket ipc in/out

Change-Id: I1e8b680b53516f92b21fa76cadcafb413be89792
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoMigrate ss data to both of system/admin user db 95/81095/2
Kyungwook Tak [Fri, 22 Jul 2016 04:29:17 +0000 (13:29 +0900)]
Migrate ss data to both of system/admin user db

Some services changed from system to user and they should handle
migrated data and newly saved data differently by changing owner
label because user service cannot save to system db

To use key-manager uniformly by client who is in the case above,
migrated data is going to saved on both of system and admin user
(owner : 5001) db with owner "/User" because user service's smack label
is "User"

Change-Id: Ic3f3b2d02945a12ba2dd12cf9b303a640421afd2
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoMigrate secure-storage data 22/79422/5
Kyungwook Tak [Mon, 11 Jul 2016 09:30:51 +0000 (18:30 +0900)]
Migrate secure-storage data

Change-Id: Ifa89e9086a40f8dcbd82bdbc26fe14a7dcc1c8c1
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoReplace old exception with new ones. 76/61776/6
Bartlomiej Grzelewski [Wed, 9 Mar 2016 17:22:48 +0000 (18:22 +0100)]
Replace old exception with new ones.

Change-Id: I3390d6ff8a7d8e1594847fd87625144e11ec0f69

8 years agoFix internal test: xml IV length contraint changed 32/79832/1
Kyungwook Tak [Wed, 13 Jul 2016 06:59:20 +0000 (15:59 +0900)]
Fix internal test: xml IV length contraint changed

Change-Id: I8f11c416a13347afe91329fa8f7f856e073601df
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoexclude not used DPL DB sources from line coverage measurement 37/79037/1
Dongsun Lee [Fri, 8 Jul 2016 02:04:17 +0000 (11:04 +0900)]
exclude not used DPL DB sources from line coverage measurement

Change-Id: Ia6d51db6d568dfa68476e55518036dca37a832e9
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agobug fix for memory leak in CAPI 48/77748/1 accepted/tizen/common/20160701.193002 accepted/tizen/ivi/20160701.043934 accepted/tizen/mobile/20160701.043932 accepted/tizen/tv/20160701.043927 accepted/tizen/wearable/20160701.043940 submit/tizen/20160701.024415 submit/tizen_common/20160701.180000
Dongsun Lee [Fri, 1 Jul 2016 02:35:32 +0000 (11:35 +0900)]
bug fix for memory leak in CAPI

Change-Id: I9dcce77ae4a8593a65f5dfc052a2ddb654322da2
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoset PATH variable in each script files to prevent attacks modifying PATH variable 96/76996/1 accepted/tizen/common/20160629.222540 accepted/tizen/ivi/20160629.020858 accepted/tizen/mobile/20160629.020926 accepted/tizen/tv/20160629.020849 accepted/tizen/wearable/20160629.020904 submit/tizen/20160628.084110
Dongsun Lee [Tue, 28 Jun 2016 08:08:27 +0000 (17:08 +0900)]
set PATH variable in each script files to prevent attacks modifying PATH variable

Change-Id: Ia761ed172d39585a5b2c1561d4fda80166943ef9
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agochange wearable SINCE for deprecated APIs for tizen 2.4 62/68162/2 accepted/tizen/common/20160504.125645 accepted/tizen/ivi/20160503.093928 accepted/tizen/mobile/20160503.093834 accepted/tizen/tv/20160503.093854 accepted/tizen/wearable/20160503.093910 submit/tizen/20160503.023925 submit/tizen/20160503.024024
Dongsun Lee [Tue, 3 May 2016 00:40:40 +0000 (09:40 +0900)]
change wearable SINCE for deprecated APIs for tizen 2.4

Change-Id: Ic2feeda1bc274fa3944c3e2e93cb4d2215712ac6
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoCoding style applied according to style checker 95/62595/7 accepted/tizen/common/20160418.142113 accepted/tizen/ivi/20160418.235747 accepted/tizen/mobile/20160418.235742 accepted/tizen/tv/20160418.235750 accepted/tizen/wearable/20160418.235737 submit/tizen/20160418.104308
Kyungwook Tak [Tue, 12 Apr 2016 10:19:09 +0000 (19:19 +0900)]
Coding style applied according to style checker

Checker/Guide in http://10.113.136.204/confluence/pages/viewpage.action?pageId=44567756

Change-Id: Ie1c934dcc898b72a68b7a56d43eea4a3298b509c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoUse "/tmp" sqlcipher tmp dir as top priority 43/63943/3 accepted/tizen/common/20160329.143039 accepted/tizen/ivi/20160405.010159 accepted/tizen/mobile/20160405.010056 accepted/tizen/tv/20160405.010122 accepted/tizen/wearable/20160405.010134 submit/tizen/20160329.070220
Kyungwook Tak [Tue, 29 Mar 2016 02:43:54 +0000 (11:43 +0900)]
Use "/tmp" sqlcipher tmp dir as top priority

[Reason]
Original top priority tmp dir was /var/tmp(->/opt/var/tmp)
which is labeled as "_" so not available to write.

[Solution]
Use "/tmp" instead

[Verification]
Run security-tests

Change-Id: I509bedfec48a0ecf8672c6219ad7df2d565e380f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAPIs since 3.0 for wearable profile 01/63101/2 accepted/tizen/common/20160324.172934 submit/tizen/20160324.041920
Kyungwook Tak [Tue, 22 Mar 2016 05:57:31 +0000 (14:57 +0900)]
APIs since 3.0 for wearable profile

Wearable profile doesn't have platform version 2.4
So APIs newly added on platform version 2.4 (on mobile profile)
should be shown as since 3.0 for wearable profile

Change-Id: I63d107740ac17b682fb2a06bbd3a59db0663e3e1
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoChange char unique_ptr to char vector 99/62999/1 accepted/tizen/common/20160322.150131 accepted/tizen/ivi/20160323.011052 accepted/tizen/mobile/20160323.011000 accepted/tizen/tv/20160323.011015 accepted/tizen/wearable/20160323.011033 submit/tizen/20160322.014817
Kyungwook Tak [Mon, 21 Mar 2016 11:55:45 +0000 (20:55 +0900)]
Change char unique_ptr to char vector

char vector can free resource naturally than unique_ptr
which should use delete [] explicitly by destructor.

Related SVACE defect id : 56526, 56527

Vericiation: ckm-tests-internal --run_test=ENCRYPTION_SCHEME_TEST

Change-Id: I508192c49557b9f980556e7a20d589be37390b3b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoHotfix: build error by warning on 64bit arch 25/62425/1 accepted/tizen/common/20160317.155640 accepted/tizen/ivi/20160318.111629 accepted/tizen/mobile/20160318.111115 accepted/tizen/tv/20160318.111240 accepted/tizen/wearable/20160318.111325 submit/tizen/20160316.050624
Kyungwook Tak [Wed, 16 Mar 2016 04:50:35 +0000 (13:50 +0900)]
Hotfix: build error by warning on 64bit arch

unused return value of BIO_reset

Change-Id: If03759de08a0f5e67d8e344f0026032b3f16ccf3
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoVersion 0.1.23 10/62410/1 submit/tizen/20160316.043041
Kyungwook Tak [Wed, 16 Mar 2016 04:24:01 +0000 (13:24 +0900)]
Version 0.1.23

Remove unused internal functions in common lib
Refactor client-capi code as c++ style
Remove CKMC error -> CKMC error converter

Change-Id: I0f1a0b166720eec86821aa5cfbc80814c03ed66b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd internal TC: for Base64, DataType 90/62390/1
Kyungwook Tak [Tue, 15 Mar 2016 13:30:54 +0000 (22:30 +0900)]
Add internal TC: for Base64, DataType

Change-Id: Ic5bdcd1298e1b76c37ee69f58dff2b7dc39fbcdf
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoClean up move/copy assignment/constructor 89/62389/1
Kyungwook Tak [Tue, 15 Mar 2016 05:27:19 +0000 (14:27 +0900)]
Clean up move/copy assignment/constructor

Change-Id: If87eacaa85ac5b7d11cede5a256c62e4e71cc935
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoClean up old dpl core sources 88/62388/1
Kyungwook Tak [Tue, 15 Mar 2016 03:06:23 +0000 (12:06 +0900)]
Clean up old dpl core sources

errno to string function is too heavy. make it light-weighted
Use dpl log to print assert message and unhandled exception
dpl log can print to several provider(console, journal, dlog) already
by modify configuration file

Change-Id: Ib2e090a0e1c5aafa51bde40c73030b435ae1a1e8
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove unused functions in certificate-impl 87/62387/1
Kyungwook Tak [Tue, 15 Mar 2016 02:47:09 +0000 (11:47 +0900)]
Remove unused functions in certificate-impl

Change-Id: I343f14a7fa076ea8c7f744b5aa6c2c4babe70633
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRefactor client-capi manager as c++ style 86/62386/1
Kyungwook Tak [Tue, 15 Mar 2016 02:26:58 +0000 (11:26 +0900)]
Refactor client-capi manager as c++ style

Change-Id: If26aab66bc2b8e4fdfb14c62d9c79300d8af61e0
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove useless CKMC error -> CKM error converter 85/62385/1
Kyungwook Tak [Tue, 15 Mar 2016 01:06:03 +0000 (10:06 +0900)]
Remove useless CKMC error -> CKM error converter

Change-Id: Ia8fcfd5424d2886ffcc535220b301c1bb9ea8078
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd for_each files handling style when reading dir 46/62146/2
Kyungwook Tak [Mon, 14 Mar 2016 13:46:06 +0000 (22:46 +0900)]
Add for_each files handling style when reading dir

Change-Id: I41ecf62acf6277db6651fdbf3ac5b0eb4761f005
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoFix SVACE defects 36/61936/1
Kyungwook Tak [Fri, 11 Mar 2016 08:13:54 +0000 (17:13 +0900)]
Fix SVACE defects

Use thread-safe functions
Initialize values in constructor
Catch all exceptions

Change-Id: I7ce649b7ba1a11e45949e8f8fca257be4eb7f37d
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoHotfix: image creation failed 75/61875/1 accepted/tizen/common/20160311.051741 accepted/tizen/ivi/20160311.062223 accepted/tizen/mobile/20160311.062121 accepted/tizen/tv/20160311.062141 accepted/tizen/wearable/20160311.062157 submit/tizen/20160311.050745
Kyungwook Tak [Fri, 11 Mar 2016 05:03:09 +0000 (14:03 +0900)]
Hotfix: image creation failed

/usr/sbin/ldconfig cannot be found.
Use /sbin/ldconfig as it was.

Change-Id: Ieb38a62b2474ae3b89c0305c5bfb20bd9c4dbe9f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoVersion 0.1.22 40/61140/1 accepted/tizen/common/20160304.195623 accepted/tizen/ivi/20160305.094038 accepted/tizen/ivi/20160310.052635 accepted/tizen/mobile/20160305.093950 accepted/tizen/mobile/20160310.052524 accepted/tizen/tv/20160305.094004 accepted/tizen/tv/20160310.052553 accepted/tizen/wearable/20160305.094023 accepted/tizen/wearable/20160310.052608 submit/tizen/20160304.072344 submit/tizen/20160305.131859
Kyungwook Tak [Fri, 4 Mar 2016 07:21:37 +0000 (16:21 +0900)]
Version 0.1.22

- Fix SVACE defects
- Remove hard-coded paths
- remove dependency from pwdutils -> user/group manage backup plan given up for now...

Change-Id: I91ede36bcbc017a067783fbbf46a6c919cf6c717
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoSync error code description with common package 37/61137/1
Kyungwook Tak [Fri, 4 Mar 2016 07:14:40 +0000 (16:14 +0900)]
Sync error code description with common package

platform/core/api/common error_message/key-manager.xml

Change-Id: Iae51652c580f4b3ccf4fbd2dec261e97a0a04bcd
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd description of changed priv on ocsp check API 28/61128/2
Kyungwook Tak [Fri, 4 Mar 2016 06:32:48 +0000 (15:32 +0900)]
Add description of changed priv on ocsp check API

Change-Id: I8247cd2fd48c973528d801cd3347d963dfa8ade0
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoFix unsafe buffer usage 69/60969/5
Kyungwook Tak [Thu, 3 Mar 2016 03:08:04 +0000 (12:08 +0900)]
Fix unsafe buffer usage

- sprintf
- strcpy

Change-Id: I85716d6daabc149526146dfe375874a7057550a2
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove all of hard coded paths 12/61112/3
Kyungwook Tak [Fri, 4 Mar 2016 04:36:03 +0000 (13:36 +0900)]
Remove all of hard coded paths

Change-Id: Ib829bab36e177d36c6093707e5212acc0a82bcf7
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoDeprecate key-manager user/group manage backup plan 21/60921/1
Kyungwook Tak [Thu, 3 Mar 2016 03:19:46 +0000 (12:19 +0900)]
Deprecate key-manager user/group manage backup plan

pwdutils package would be excluded from binary

Change-Id: Ia9bcd5c3e35f319f7ad9810ef5ebbd00a976c1bb
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove usage of _datadir macro 80/60780/1 accepted/tizen/common/20160302.193206 submit/tizen/20160229.000000
Kyungwook Tak [Wed, 2 Mar 2016 07:40:14 +0000 (16:40 +0900)]
Remove usage of _datadir macro

TZ_SYS_SHARE is changed to /opt/share by tizen-platform-config commit:
Change: https://review.tizen.org/gerrit/#/c/59623
commit id: bde2d5558c63ce281ea85c294be1816783612f92

Change-Id: I6b00ba7b39e10b30e19ec0346a5aef20c931a9b8
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoVersion 0.1.21 72/60572/1 accepted/tizen/common/20160229.161126 accepted/tizen/common/20160301.120622 accepted/tizen/common/20160307.055005 accepted/tizen/ivi/20160229.100914 accepted/tizen/ivi/20160307.020105 accepted/tizen/mobile/20160229.100823 accepted/tizen/mobile/20160307.020004 accepted/tizen/tv/20160229.100839 accepted/tizen/tv/20160307.020031 accepted/tizen/wearable/20160229.100855 accepted/tizen/wearable/20160307.020050 submit/tizen/20160229.062547 submit/tizen/20160306.231523 submit/tizen_common/20160229.190608
Kyungwook Tak [Mon, 29 Feb 2016 06:24:24 +0000 (15:24 +0900)]
Version 0.1.21

- Translation of label <-> pkgid made by Security Manager
- Add BSD license for SQL Cipher

Change-Id: I40fadb12f5472a99624ddf342a8b480fc1bf3dba
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd BSD-2.0 license for sqlcipher 70/60570/1
Kyungwook Tak [Mon, 29 Feb 2016 06:21:03 +0000 (15:21 +0900)]
Add BSD-2.0 license for sqlcipher

Refer SQL Cipher license info in https://www.zetetic.net/sqlcipher/license/

Change-Id: I54e9569cd529b65e4af8be857c7ac33dd822012b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoChange log level when smacklabel isn't found by SM 15/60215/1
Kyungwook Tak [Wed, 24 Feb 2016 07:25:16 +0000 (16:25 +0900)]
Change log level when smacklabel isn't found by SM

Change-Id: Ic06d8346a2fa5e9181b5abbef97ecf49101b5ace
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoFix hard-coded paths and test res installation 98/60198/1
Kyungwook Tak [Wed, 24 Feb 2016 06:22:17 +0000 (15:22 +0900)]
Fix hard-coded paths and test res installation

Change-Id: Icaf1b070b8fbbc5368643d53755a759f98ed3245
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd getting pkgId form socket using new SM API 79/50179/9
Adam Malinowski [Mon, 26 Oct 2015 13:25:31 +0000 (14:25 +0100)]
Add getting pkgId form socket using new SM API

Change-Id: Iabb1c021fd98c3998b4f7031f042d1c35a611fa6

8 years agoVersion 0.1.20 04/57704/1 accepted/tizen/ivi/20160218.023922 accepted/tizen/mobile/20160122.034950 accepted/tizen/tv/20160122.035007 accepted/tizen/wearable/20160122.035028 submit/tizen/20160122.022048 submit/tizen_common/20160218.142243 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Kyungwook Tak [Fri, 22 Jan 2016 02:15:03 +0000 (11:15 +0900)]
Version 0.1.20

Hotfix: Smack label/type setting failed when installs rpm

Change-Id: I9029495356b1b9d4e5b0c09fdb48adf24b08115c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove '/' from the end of rw_data_dir for manifest 03/57703/1
Kyungwook Tak [Fri, 22 Jan 2016 02:11:42 +0000 (11:11 +0900)]
Remove '/' from the end of rw_data_dir for manifest

filesystem path attribute on manifest file cannot parse
corretcly with '/' at the end of path. Smack label/type couldn't
set with it.

Add %dir directive on file list on %files. It's for removing all
resources and directories clearly when rpm update/remove.

Change-Id: I6bca24de763cc6754cd3c5a77cbf7a4ac6e86970
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoVersion 0.1.19 08/57208/1 accepted/tizen/mobile/20160118.083751 accepted/tizen/tv/20160118.083920 accepted/tizen/wearable/20160118.083959 submit/tizen/20160118.045418
Kyungwook Tak [Mon, 18 Jan 2016 02:52:08 +0000 (11:52 +0900)]
Version 0.1.19

Change-Id: I10a96d85897401716a053a795de1d9d609416c3f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoUse internal package manager client API 33/57133/4
Kyungwook Tak [Fri, 15 Jan 2016 08:31:11 +0000 (17:31 +0900)]
Use internal package manager client API

capi-package-manager API is for application layer.

Change-Id: Ia07e0e3514303a62df6d723303d46c5bec791876
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove empty listener rpm 32/57132/3
Kyungwook Tak [Fri, 15 Jan 2016 06:03:55 +0000 (15:03 +0900)]
Remove empty listener rpm

Change-Id: I2dec628ffee5af467a5d31eb81a8b2e3909186f5
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoGet dir locations from environment 19/56619/10
Krzysztof Jackiewicz [Fri, 8 Jan 2016 12:32:28 +0000 (13:32 +0100)]
Get dir locations from environment

[Problem] Key manager data dir location was hardcoded to /opt/data/ckm/. On
common profile image key-manager fails to start because of lack of /opt/data.
[Solution] Get directory locations from tizen platform config. Copy files
from old location if necessary. Make installation fail if runtime and compile
time settings differ. Provide upgrade script.

[Verification] Install key-manager package. Make sure all the content from
/opt/data/ckm/ has been moved to new location (/usr/data/ckm). Run tests. Make
sure all data is placed in new location. Run upgrade scripts
(/etc/opt/upgrad/*key-manager*.sh) on old version of ckm and check results.

Change-Id: Idafbe0fe43f1140c137f87883273b609a499b4cc

8 years agoNot to set DKEK value to DEK struct salt attribute 18/56818/3 accepted/tizen/mobile/20160114.011900 accepted/tizen/tv/20160114.011913 accepted/tizen/wearable/20160114.011935 submit/tizen/20160113.071851
Kyungwook Tak [Wed, 13 Jan 2016 01:14:48 +0000 (10:14 +0900)]
Not to set DKEK value to DEK struct salt attribute

DEK struct salt value is derived from DKEK. It's not
clear to be stored on multiple data which is security-sensitive.

Change-Id: Ie3684e350d12dce132cb9425de3b075e25dbb63e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agochange "protected by a user password" to "protected by Tizen platform" in a document... 29/56829/2
Dongsun Lee [Wed, 13 Jan 2016 04:39:48 +0000 (13:39 +0900)]
change "protected by a user password" to "protected by Tizen platform" in a document file

Change-Id: Ib303ef0596203e2dd5fe0ae7a89a517bad494a9a
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoIntegrate glib loop with key-manager. 31/56131/7
Bartlomiej Grzelewski [Mon, 4 Jan 2016 14:50:12 +0000 (15:50 +0100)]
Integrate glib loop with key-manager.

Change-Id: I218d3794e4405ea668c513b3ba40a6e3f98e044c

8 years agoRemove key-manager-listener. 20/56220/4
Bartlomiej Grzelewski [Tue, 5 Jan 2016 10:48:56 +0000 (11:48 +0100)]
Remove key-manager-listener.

Change-Id: I5c56ebadc865ff61b18f7fa6235963aa0d3b4376

8 years agoMove data dir labeling & chowning to key-manager post 18/56618/2
Krzysztof Jackiewicz [Mon, 11 Jan 2016 10:48:23 +0000 (11:48 +0100)]
Move data dir labeling & chowning to key-manager post

[Problem] Key-manager data dir was labeled and chowned in key-manager-listener
post install section.
[Solution] Moved to key-manager post section

[Verification] Install key-manager. Smack shouldn't report any denials to data
directory.

Change-Id: I345716a676f6abaa8670911e1ec7af3e57e9cb54

8 years agoChange user from root to key-manager 46/54746/7
Bartlomiej Grzelewski [Wed, 16 Dec 2015 16:50:30 +0000 (17:50 +0100)]
Change user from root to key-manager

[Solution] User changed. Smack labels/manifests adjusted. Runtime directory
created. Tests adjusted.

Change-Id: I22b7ed01158b16ce3ac3d04110e4ab2ab3d46711

8 years agoFix file permissions. 19/56119/2
Bartlomiej Grzelewski [Mon, 4 Jan 2016 12:26:44 +0000 (13:26 +0100)]
Fix file permissions.

Change-Id: I8aa70dd580c192d7ec5d2b28ebbcb3d1ee0193a3

8 years agoAdd license header on tests srcs 87/56087/2
Kyungwook Tak [Mon, 4 Jan 2016 07:46:57 +0000 (16:46 +0900)]
Add license header on tests srcs

Change-Id: I9603ef02dec7d541ab0cbd13768ebc8fb0bdc12b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd boost license 94/55594/1 accepted/tizen/mobile/20151230.112505 accepted/tizen/tv/20151230.112606 accepted/tizen/wearable/20151230.112703 submit/tizen/20151229.090334
Kyungwook Tak [Mon, 28 Dec 2015 05:31:32 +0000 (14:31 +0900)]
Add boost license

Change-Id: I08f4157f1653afb7afcc17741ca90892831b39fd
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoApply coding rule 15/54015/13
sangwan.kwon [Thu, 10 Dec 2015 04:49:43 +0000 (13:49 +0900)]
Apply coding rule

covered Tizen C++ coding rule list

 - [R06] : Do not unnecessarily use braces where a single statement will do.
- Exception: if one branch of a conditional statement is a single statement,
 use braces in both branches.

 - [M08] : Keywords have following space rules
- Put a space after (most) keywords
- example: if, switch, case, for, do, while
- Do not put a space after function like keywords
- example: sizeof, typeof, alignof, __attribute__

 - [M09] : Operators have following space rules
- Put a space around(on each side of) most binary and ternary operators
- Example : = + -< > * / % | & ^ <= >= == != ? :
- Do not put a space after unary operators
- Example: & * + -~ !
- Unary "++" and unary "--" are allowed no space on one side
- Do not put a space around the "." and "->" structure member operators.
- Do not put a space after cast operator

 - [M10] : Seperators have following space rules
- Put a space after closing brace when it has anything on the line.
- Exception : comma after closing brace '},‘
- Put a space after comma
- Do not put space inside parenthesis '(', ')‘
- Do not put space before open square bracket '[‘ and inside square bracket '[', ']‘

 - [M12] : Functions have the opening brace at the beginning of the next line.

 - [M13] : The open brace last on the line. The closing brace is empty on a line of its own
- Exception : else, whileshould follow close brace '}’

 - [M14] : Open braces for enum, union and structgo on the same line

Change-Id: I6e59513ba121a25222e6e626792b3e115ebec1d3
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
8 years agoChange exception type in db-crypto.cpp 88/52688/5
Bartlomiej Grzelewski [Wed, 25 Nov 2015 15:52:45 +0000 (16:52 +0100)]
Change exception type in db-crypto.cpp

Change-Id: I537d47a4d6cb4d632a46f0527be17108e1353b4a

8 years agoRemove duplicated entries in spec 64/53964/3
Krzysztof Jackiewicz [Thu, 10 Dec 2015 11:33:34 +0000 (12:33 +0100)]
Remove duplicated entries in spec

[Problem] Duplicated entries in spec.
[Solution] Removed.

[Verification] Successfull compilation. Run tests.

Change-Id: I2c356b854bee089dc3675b84d7ea32930192dbd1

8 years agoFix file copying in scheme test 63/53963/2
Krzysztof Jackiewicz [Mon, 7 Dec 2015 14:27:03 +0000 (15:27 +0100)]
Fix file copying in scheme test

[Problem] Wrong creation flag was used. Wrong owner used. Files not closed.
[Solution] Change files owner and fix the flag. Close descriptors.

[Verification] Run ckm-tests-internal  -t ENCRYPTION_SCHEME_TEST

Change-Id: I9289f231fc27ff863552c65a1f76627189ed5bdb

8 years agoRevert "Add PASSWORD_PROTECTION_DISABLE feature" 61/53961/1
Bartlomiej Grzelewski [Tue, 24 Nov 2015 14:50:44 +0000 (15:50 +0100)]
Revert "Add PASSWORD_PROTECTION_DISABLE feature"

This reverts commit c960d5d61979802933b7cc44b66a118b5861edf7.

Change-Id: Ia3225c3a460f48dde93a272e931f6a53d461f48c

8 years agochange log level to warning in case for the failure of FIPS_mode_set 51/53351/1
Dongsun Lee [Fri, 4 Dec 2015 07:05:34 +0000 (16:05 +0900)]
change log level to warning in case for the failure of FIPS_mode_set

Change-Id: Ia2f99bf55b118d0967c0eeb2af86f39a7b567596
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoRemove digest implementation. 89/52989/2
Bartlomiej Grzelewski [Mon, 30 Nov 2015 15:42:53 +0000 (16:42 +0100)]
Remove digest implementation.

Change-Id: Ib4c38cae9370e3f39ffb59e9d7602238d178c849

8 years agoFix implementation of sw-backend. 76/52676/3
Bartlomiej Grzelewski [Wed, 25 Nov 2015 13:20:37 +0000 (14:20 +0100)]
Fix implementation of sw-backend.

sw-backend cound not depend from certificate-impl.h and key-impl.h.

Change-Id: I7826f0c94bf18d1ad92ac59820120b6ee45531eb

8 years agoDetailed documentation for encryption/decryption API 42/52642/2
Krzysztof Jackiewicz [Wed, 25 Nov 2015 09:19:17 +0000 (10:19 +0100)]
Detailed documentation for encryption/decryption API

[Problem] The encryption/decryption API documentation in header file wasn't
detailed enough.
[Solution] Add more more details.

[Verification] Rate intelligibility of documentation

Change-Id: I2695651928ccf294e94fed2e4c2d0a4019365582

8 years agoLicense date updated 74/52174/2
Krzysztof Jackiewicz [Thu, 19 Nov 2015 12:50:20 +0000 (13:50 +0100)]
License date updated

[Problem] Wrong date in LICENSE file
[Solution] Date fixed

[Verification] Compare with current year

Change-Id: Ia9a4d2da70d6f01d5f036c376e220b9637f81870

8 years agoConversion PEM -> DER moved to store. 83/52483/5
Bartlomiej Grzelewski [Mon, 23 Nov 2015 10:09:34 +0000 (11:09 +0100)]
Conversion PEM -> DER moved to store.

Change-Id: Ia748520a828f1dfcb3097dbde0ac28aaf22a8c52

8 years agoLoad app key when importing initial values 36/51436/12
Krzysztof Jackiewicz [Mon, 16 Nov 2015 14:18:01 +0000 (15:18 +0100)]
Load app key when importing initial values

[Problem] Missing app key.
[Solution] Fixed.

[Verification] Run tests

Change-Id: If1a156094bb81a349af41f077443c6503b9cea04

8 years agoEncrypted Initial Values: decrypting items from XML files. 11/44411/22
Maciej J. Karpiuk [Tue, 21 Jul 2015 12:53:27 +0000 (14:53 +0200)]
Encrypted Initial Values: decrypting items from XML files.

Change-Id: I08d53475401407c76d8aafbefc0b4d2f4fd82204

8 years agoEncrypted Initial Values: parsing key values. 73/44273/23
Maciej J. Karpiuk [Mon, 20 Jul 2015 09:31:29 +0000 (11:31 +0200)]
Encrypted Initial Values: parsing key values.

Change-Id: Iecebe5cba1ce716e43fff09ddc442a57dcfdf976

8 years agoEncrypted Initial Values: re-factoring the schema to support new requirements. 56/43856/23
Maciej J. Karpiuk [Tue, 14 Jul 2015 09:31:28 +0000 (11:31 +0200)]
Encrypted Initial Values: re-factoring the schema to support new requirements.

New requirements are: support for encrypting data and certificate objects.
This requires providing hybrid encryption: device key encrypts AES key, which
is used to encrypt the values.
Device key cannot directly encrypt values due to block size limitation of RSA OAEP algorithm.

Change-Id: I61f52bad74d7cf2f6018a1e0e38cc852a932619e

8 years agoAdd DataContainer class to contain data, its type and encryption details. 36/46636/16
Maciej J. Karpiuk [Mon, 24 Aug 2015 08:52:09 +0000 (10:52 +0200)]
Add DataContainer class to contain data, its type and encryption details.

[Problem] Encrypted data details are kept separately to the data.
[Solution] Store provides an interface to handle data, type and encryption details in a single object.

Change-Id: Ic35a0a6205670c2a41a183e56b884be87179ebab

8 years agoMove call to xmlCleanupParser 60/51860/6
Krzysztof Jackiewicz [Mon, 16 Nov 2015 13:57:49 +0000 (14:57 +0100)]
Move call to xmlCleanupParser

[Problem] xmlCleanupParser should be called only before program exit.
[Solution] Moved to global object constructor.

[Verification] Successfull compilation

Change-Id: Id2fedd8b99c9b598eaef14f7c12d37282e74814a

8 years agoCKMLogic will not depend from InitialValues. 91/52491/3
Bartlomiej Grzelewski [Mon, 23 Nov 2015 15:59:34 +0000 (16:59 +0100)]
CKMLogic will not depend from InitialValues.

Change-Id: I91ce4dcadd49ae813c1ca59418ea8f730110718b

8 years agoMerge "Add PASSWORD_PROTECTION_DISABLE feature" into tizen
Dongsun Lee [Tue, 24 Nov 2015 01:46:22 +0000 (17:46 -0800)]
Merge "Add PASSWORD_PROTECTION_DISABLE feature" into tizen

8 years agoAdd PASSWORD_PROTECTION_DISABLE feature 15/52215/1
Dongsun Lee [Fri, 20 Nov 2015 02:55:02 +0000 (11:55 +0900)]
Add PASSWORD_PROTECTION_DISABLE feature

Change-Id: I58a8bde0e4424168a61590d6a5f12fb8e28f50b2
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoFix character trimming in xml parser 61/51861/4
Krzysztof Jackiewicz [Mon, 16 Nov 2015 14:06:48 +0000 (15:06 +0100)]
Fix character trimming in xml parser

[Problem] ASCII tag content is being trimmed and it shouldn't be.
[Solution] Don't trim tag content in Characters() callback. If trimming is
necessary it can be done in End() callback. Exception will be thrown only if
non-whitespace characters are found within tags that shouldn't have any
character content (InitialValueHandler, PermissionHandler).

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

Change-Id: I39a928bf15be29ade96986d619c9023fb4cd3234

8 years agoFix bug found by Klocwork 61/52161/1
Krzysztof Jackiewicz [Thu, 19 Nov 2015 10:43:20 +0000 (11:43 +0100)]
Fix bug found by Klocwork

[Problem] The command received from encryption service is deserialized into a
variable hiding function argument of the same name. Also the received command
was ignored.
[Solution] Check if received command is equal to requested one.

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

Change-Id: I16e14dbc8497a9b6ea11d93c8c0a48071562d684

8 years agotry-catch enclosed to be exception safe of CAPI 37/51737/1
Kyungwook Tak [Fri, 13 Nov 2015 08:54:10 +0000 (17:54 +0900)]
try-catch enclosed to be exception safe of CAPI

Change-Id: I8c88402c6ed8f73bb1e5510389fec2aa07cfd48c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove MDFPP related code 63/51463/2
Kyungwook Tak [Tue, 10 Nov 2015 02:53:18 +0000 (11:53 +0900)]
Remove MDFPP related code

Change-Id: I4b2078f2f2ebc8ebbd31fb3b7995eb1807fc3a49
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoProtocol refactoring. 45/40145/5
Bartlomiej Grzelewski [Mon, 26 Oct 2015 12:10:50 +0000 (13:10 +0100)]
Protocol refactoring.

Introduce CryptoAlgorithm in internal socket protocol.

Change-Id: I70000a05e0a47d2b12af9b11324adf67da0f5e22

9 years agoAdd encryption scheme tests 67/48667/21
Krzysztof Jackiewicz [Thu, 24 Sep 2015 09:21:03 +0000 (11:21 +0200)]
Add encryption scheme tests

[Problem] We need tests that will verify correctness of old and new encryption
scheme support.
[Solution] Tests added.

[Verification] Run ckm-tests-internal -t ENCRYPTION_SCHEME_TEST

Change-Id: I9f4e24a9e06684d401540646d5560287e35b828d

9 years agoUse exportable=true when reading certificate from db 68/48768/14
Krzysztof Jackiewicz [Tue, 29 Sep 2015 07:07:21 +0000 (09:07 +0200)]
Use exportable=true when reading certificate from db

[Problem] Key manager allows creating a cert chain from not exportable
certificates.
[Solution] CKMLogic::readCertificateHelper modified to use exportable flag
equal to 'true'.

[Verification] Run ckm-tests-internal -t ENCRYPTION_SCHEME_TEST

Change-Id: Ib13811282eb9d1267c26741a578d8c2111bdecbb

9 years agoReturn error if password is not empty and row is not password protected 74/48874/9
Krzysztof Jackiewicz [Thu, 1 Oct 2015 06:32:54 +0000 (08:32 +0200)]
Return error if password is not empty and row is not password protected

[Problem] If old scheme row is not password protected and the user tries to
read it with non empty password it will get reencrypted with this password.
[Solution] Throw an authentication exception if password is not empty and row
is not password protected.

[Verification] Run ckm-tests-internal -t ENCRYPTION_SCHEME_TEST/T120_Read_wrong_pass

Change-Id: I44b270dbbefd043b6efb9371f0d7a81c1b234b31

9 years agoModify encryption scheme 41/48541/19
Krzysztof Jackiewicz [Mon, 7 Sep 2015 11:19:54 +0000 (13:19 +0200)]
Modify encryption scheme

[Problem] Current encryption scheme makes it impossible to remove an entry
protected with custom user password from database.
[Solution] Encryption scheme modified. Store is responsible for encrypting data
with user password. Service encrypts it with app key. Data encrypted with old
scheme that is being read will be automatically reencrypted with new scheme.

[Verification] Run tests from upcoming commit:
ckm-tests-internal -t ENCRYPTION_SCHEME_TEST

Change-Id: I8ed514290d9e75bbc89d74b006939e3cbb0b8bd2

9 years agoAdd scheme encryption test db generator 66/48666/12
Krzysztof Jackiewicz [Thu, 24 Sep 2015 07:07:55 +0000 (09:07 +0200)]
Add scheme encryption test db generator

[Problem] A database filled with all kind of data is needed for encryption
scheme tests.
[Solution] Add tool that fills the database with different kinds of data.

[Verification] Run ckm-db-generator. Use ckm_db_tool 7654 db-pass to verify
that all types of data is present in db.

Change-Id: If2d912afdfe96a535df98c5a6c03a2acb1c84af5

9 years agoAdd support for binary data to GStore 17/48117/5
Krzysztof Jackiewicz [Mon, 14 Sep 2015 13:05:44 +0000 (15:05 +0200)]
Add support for binary data to GStore

[Problem] Binary data can be imported into store but can't be retrieved from
it.
[Solution] Introduce another intermediate class in GKey hierarhy to support
binary data.

[Verification] Run tests

Change-Id: I45bf5d0a81188f13b0925e982243fdf37b569529

9 years agoVersion 0.1.18 89/49689/1 accepted/tizen/mobile/20151019.074017 accepted/tizen/tv/20151019.074026 accepted/tizen/wearable/20151019.074043 submit/tizen/20151019.043615 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154344 submit/tizen_common/20151229.154718 tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
Kyungwook Tak [Mon, 19 Oct 2015 04:28:30 +0000 (13:28 +0900)]
Version 0.1.18

Change-Id: I33e245d9b8b6b6ca81caa326d24e725c1821987b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoDon't check handle value when allocation 86/49686/1
Kyungwook Tak [Mon, 19 Oct 2015 02:43:03 +0000 (11:43 +0900)]
Don't check handle value when allocation

Change-Id: I3ab918652dc294107327bc3840bdd5c80bed0cc6
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years ago[ACR-429]Remove/Deprecated get cert chain with alias 56/49556/1
Kyungwook Tak [Thu, 15 Oct 2015 05:01:13 +0000 (14:01 +0900)]
[ACR-429]Remove/Deprecated get cert chain with alias

Change-Id: Ib1f775c98c41ef89d10199c03d17a69b7be46008
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoAdd gitignore file 55/49555/1
Kyungwook Tak [Thu, 15 Oct 2015 04:56:56 +0000 (13:56 +0900)]
Add gitignore file

Change-Id: I491e88d2454a672b77e207aaf95d945c0b464591
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoVersion 0.1.17 23/49523/1 accepted/tizen/mobile/20151014.093603 accepted/tizen/tv/20151014.093615 accepted/tizen/wearable/20151014.093628 submit/tizen/20151014.083752
Kyungwook Tak [Wed, 14 Oct 2015 08:30:23 +0000 (17:30 +0900)]
Version 0.1.17

Change-Id: I93d81a35d0bf4fccb4cafbd823014cdeb4939192
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agoRemove warnings and performance problems reported by cppcheck. 10/49110/3
Bartlomiej Grzelewski [Tue, 6 Oct 2015 10:41:38 +0000 (12:41 +0200)]
Remove warnings and performance problems reported by cppcheck.

Change-Id: I6c39ff383a19554da5e9f875db51864e0e5941d0