platform/core/security/libwebappenc.git
6 years agoSet RemainAfterExit=yes in webappenc-initializer.service file 69/186869/1 accepted/tizen/5.0/unified/20181102.021951 accepted/tizen/unified/20180822.093830 submit/tizen/20180821.090118 submit/tizen_5.0/20181101.000004
Dongsun Lee [Thu, 16 Aug 2018 05:38:58 +0000 (14:38 +0900)]
Set RemainAfterExit=yes in webappenc-initializer.service file

Change-Id: I19db4c9e9ccfe5d0fcdee4d71951dcf743abad98
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
6 years agoAdjust build to boost 1.65.0 and up 34/184534/1 accepted/tizen/unified/20180719.063037 submit/tizen/20180718.133940
Tomasz Swierczek [Wed, 18 Jul 2018 12:00:02 +0000 (14:00 +0200)]
Adjust build to boost 1.65.0 and up

Change-Id: I4f541900316f3419827fa3e3f66bcdf81e40f44e

7 years agoRemove deprecated upgrade script 34/144634/1 accepted/tizen_4.0_unified tizen_4.0 tizen_4.0_tv accepted/tizen/4.0/unified/20170906.143401 accepted/tizen/unified/20170829.140504 submit/tizen/20170829.084838 submit/tizen_4.0/20170905.085243 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
sangwan.kwon [Thu, 17 Aug 2017 09:13:57 +0000 (05:13 -0400)]
Remove deprecated upgrade script

Change-Id: I8907a60bb513edd1021b510c37be64f6d37c3caf
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
7 years agoFix upgrade script number 26/136726/1 accepted/tizen/4.0/unified/20170816.012948 accepted/tizen/4.0/unified/20170816.015633 accepted/tizen/4.0/unified/20170829.020530 accepted/tizen/unified/20170705.163019 submit/tizen/20170704.073704 submit/tizen/20170705.025248 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004 submit/tizen_4.0_unified/20170814.115522
sangwan.kwon [Fri, 30 Jun 2017 08:01:59 +0000 (17:01 +0900)]
Fix upgrade script number

* Accordig to OS upgrade team's guide, this script would be run as 240.

Change-Id: I96d0a68915acc21cf82f48ff5704fc11a1989653
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
(cherry picked from commit ec1709d20c9c6a243f1b2b1976819e4017601c18)

7 years agoUpgrade version to 0.1.1 28/129428/1 accepted/tizen/unified/20170517.080131 submit/tizen/20170517.012418 tizen_4.0.m1_release
sangwan.kwon [Tue, 16 May 2017 10:19:13 +0000 (19:19 +0900)]
Upgrade version to 0.1.1

Change-Id: I8d042124bd7bed693c9914ac1aec10c21a606235
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
7 years agoFix log fomatter according to boost version upgrade 15/128915/1
sangwan.kwon [Fri, 12 May 2017 05:11:02 +0000 (14:11 +0900)]
Fix log fomatter according to boost version upgrade

Change-Id: I45ebc7ad1e47ae1c6be71be50a50d5ad4a1330c9
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
7 years agoReplace deprecated readdir_r with readdir 95/106095/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/common/20161227.192128 accepted/tizen/ivi/20161226.131247 accepted/tizen/mobile/20161226.131205 accepted/tizen/tv/20161226.131214 accepted/tizen/unified/20170309.033925 accepted/tizen/wearable/20161226.131224 submit/tizen/20161226.013211 submit/tizen_unified/20170308.100409
Kyungwook Tak [Tue, 20 Dec 2016 10:49:27 +0000 (19:49 +0900)]
Replace deprecated readdir_r with readdir

Change-Id: Ic5649cafedfcb3a91c839c33f261c6da7475a9a9
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
7 years agoRefine directory traversing: registering callback 66/103266/4
Kyungwook Tak [Thu, 8 Dec 2016 01:12:11 +0000 (10:12 +0900)]
Refine directory traversing: registering callback

There's two part of directory traversing(removing all files in directory
and loading preloaded app deks). So duplicated code can be compressed to
traverse_directory with entry callback registered.

Change-Id: I654bed7f3b4efff75b2853fceb3f9d97b51a85b5
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
7 years agoRemove reload option to wae initializer service 55/103255/3
Kyungwook Tak [Wed, 7 Dec 2016 08:22:40 +0000 (17:22 +0900)]
Remove reload option to wae initializer service

Reload option is not needed anymore.
To be secure, remove all KEKs from dek store (also adek) after loading
preloaded adeks once. Loaded adeks are stored in key-manager so they're
useless.
Related test cases are added. (load preloaded app deks)

(TODO) To use key-manager initial value feature is highly considered
to store KEK private key more securely.

Change-Id: I2f6c645398277968cd7d480236d1802a07fa33df
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
7 years agoFix for wae_initializer 54/103254/1
Bartlomiej Kunikowski [Mon, 5 Dec 2016 07:49:59 +0000 (08:49 +0100)]
Fix for wae_initializer

There is a bug in if statement, it don't allow to properly work
of this initializer if there are no --reload flag.

Other way to do it is simply use wae_initializer always as it
is with --reload flag.

Change-Id: I9622373c914f8c0f1f22d3f810417251cced81ba
Signed-off-by: Bartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
(cherry picked from commit 1fcac8945420537f89d24a0e8e52ec99cc432674)

7 years agoUse cp instead of mv in upgrade script 32/102232/1
Kyungwook Tak [Mon, 5 Dec 2016 08:13:40 +0000 (17:13 +0900)]
Use cp instead of mv in upgrade script

RO partition shouldn't be modified

Change-Id: I70b8de4051cd4295b5431b77fd5eb82f1e518731
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
7 years agoNumbering upgrade script 31/102231/1
Kyungwook Tak [Mon, 5 Dec 2016 08:10:20 +0000 (17:10 +0900)]
Numbering upgrade script

wae-upgrade.sh -> 200.wae.sh

Change-Id: I77f59c43be20cdb7eb808ca5e7a754287bcdfcb0
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
7 years agoFix svace defects 67/100567/2
Kyungwook Tak [Mon, 28 Nov 2016 11:25:03 +0000 (20:25 +0900)]
Fix svace defects

1) Missing returned value checking.
2) variable misused (start -> end).
3) Dead code exist in preloaded app dek loading while loop.
   Make subroutine to simplify loop codes/resource managed.

Change-Id: Ic775e336e6480dfb56539e382edf292f2101ec8b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd upgrade script 54/87054/2
Kyungwook Tak [Tue, 6 Sep 2016 06:55:08 +0000 (15:55 +0900)]
Add upgrade script

Change-Id: I4d38443cf3880b50215aa36e084445cc8bbb60be
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years ago[HOTFIX] Fix build break on 64bit arch 72/83472/2 accepted/tizen/3.0/common/20161114.110011 accepted/tizen/3.0/ivi/20161011.050558 accepted/tizen/3.0/mobile/20161015.033720 accepted/tizen/3.0/tv/20161016.005422 accepted/tizen/3.0/wearable/20161015.083618 accepted/tizen/common/20160812.140751 accepted/tizen/ivi/20160815.233255 accepted/tizen/mobile/20160815.233150 accepted/tizen/tv/20160815.233213 accepted/tizen/wearable/20160815.233236 submit/tizen/20160811.062803 submit/tizen/20160812.053402 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000004 submit/tizen_3.0_mobile/20161015.000004 submit/tizen_3.0_tv/20161015.000004 submit/tizen_3.0_wearable/20161015.000004
sangwan.kwon [Thu, 11 Aug 2016 06:15:12 +0000 (15:15 +0900)]
[HOTFIX] Fix build break on 64bit arch

[Problem]
* EVP_Digest parameter type is unsigned int
* size_t is differ between 32bit and 64bit

[Solution]
* Use unsigned int instead of size_t

Change-Id: Ib398532c7148bcd9d736c7282e0b74c8042a2ede
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
8 years ago[API changed] Add uid parameter 01/81601/3 submit/tizen/20160811.013634
Kyungwook Tak [Wed, 27 Jul 2016 07:54:50 +0000 (16:54 +0900)]
[API changed] Add uid parameter

Installer will be run as system (from user) so we cannot retrieve user
id from client credential(by key-manager).

Change-Id: I1e091bfc0b88fce418cd209a7a1adab021b6c0d2
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoSet uid/gid to wae initializer service 43/82343/1
Kyungwook Tak [Wed, 3 Aug 2016 04:17:17 +0000 (13:17 +0900)]
Set uid/gid to wae initializer service

Change-Id: I15ee0cb42c05cf19d875b4b9acf96e78939a240f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd data structures 79/80979/4
Kyungwook Tak [Thu, 21 Jul 2016 07:46:00 +0000 (16:46 +0900)]
Add data structures

For migrated web app, we need to more fields in cache e.g., IV and
is_migrated flag to handle it separately.

Because cipher algorithm, iv and key size could be different between old
secure storage, it depends on product implementation. So this
architecture needs more flexibility.

A lot of code changed because of the principle data structure is added
from the bottom.

Change-Id: Id6a10b9f707f4da25016dd928ab4049be619a610
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoSet SmackProcessLabel to System 16/80816/3 accepted/tizen/common/20160721.175841 accepted/tizen/ivi/20160721.090758 accepted/tizen/mobile/20160721.090508 accepted/tizen/tv/20160721.091325 accepted/tizen/wearable/20160721.091037 submit/tizen/20160721.003054
Yunjin Lee [Wed, 20 Jul 2016 10:24:34 +0000 (19:24 +0900)]
Set SmackProcessLabel to System

Change-Id: I685a98780fde45ad0975a0a80dcabd68760f9244
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
8 years agoFix memory leak on decrypt migrated wgt 25/80625/2
Kyungwook Tak [Tue, 19 Jul 2016 07:21:51 +0000 (16:21 +0900)]
Fix memory leak on decrypt migrated wgt

Change-Id: I300a887e7e633af858e102797c500d1266566355
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoLogging openssl log on crypto error cases 24/80624/2
Kyungwook Tak [Tue, 19 Jul 2016 07:16:10 +0000 (16:16 +0900)]
Logging openssl log on crypto error cases

Change-Id: I60d574d8813637077fa1e278a3d72dbfed07333c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoSupport platform upgrade case 34/79634/5
Kyungwook Tak [Mon, 18 Jul 2016 03:54:40 +0000 (12:54 +0900)]
Support platform upgrade case

secure-storage is removed since Tizen platform version 3.0.
downloaded web apps encryption works based on different key from lower
than 3.0. secure-storage used DUK(device unique key with seed(pkgid)) as DEK.

If downloaded app cannot find DEK when decrypt, it's considered as
encrypted lower than 3.0 case. So webappenc creates DEK and uses algorithm
which had been used lower than 3.0 in secure-storage.

For now it's hard to save newly created old key in key-manager because
migrated web app is considered as global app and the case would be found
in decryption time (by web app launcher) who don't have permission to save
in system db of key-manager with "/System" label.

Permission policy of system db of key-manager should be changed OR
migrated app should not be global app (it should be downloaded normal
app) to save created key in key-manager.

Change-Id: I9b8516184cce9f43b328e290c15127151e5c861e
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoFix C code naming rules & minor fixes 97/80397/4
Kyungwook Tak [Mon, 18 Jul 2016 02:28:53 +0000 (11:28 +0900)]
Fix C code naming rules & minor fixes

- Remove some goto label which isn't needed
- Change 'num' param of strncmp / strncpy with meaningful value
  (static buffer's size)
- Add const to unsigned char array input param
- Change param names (c string array and raw buffer array)
  const char *pPkgId -> pkgId
  unsigned char *pDek -> dek
  unsigned char **ppDek -> pDek
- Change all camel naminges to underbar
- Remove null checking before call free()
  free() does nothing if ptr is null pointer.
  (refer: http://linux.die.net/man/3/free)
- Add missing closedir() after opendir()

Change-Id: I7e5888ed3dc77e5355cfc441f10dc0d6d916921c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoApply boost test framework 45/80245/2
Kyungwook Tak [Fri, 15 Jul 2016 10:42:35 +0000 (19:42 +0900)]
Apply boost test framework

run with sdb root on  : wae_tests --run_test=SYSTEM
run with sdb root off : wae_tests --run_test=USER

Change-Id: I0792e1e649f5e36c6f8715047f5ba5fd9ec48ecf
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd test manifest for exec labeling 84/80184/1
Kyungwook Tak [Fri, 15 Jul 2016 06:01:54 +0000 (15:01 +0900)]
Add test manifest for exec labeling

Change-Id: Ib54e8558417b8f32782c7ada3d6bdda8999a5b0f
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoApply coding style of tizen by astyle 62/80162/1
Kyungwook Tak [Fri, 15 Jul 2016 04:27:01 +0000 (13:27 +0900)]
Apply coding style of tizen by astyle

Change-Id: I495bcdeae8705c2bb8b605762e31458919736926
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoUse stdbool instead of macro for boolean 54/80154/1
Kyungwook Tak [Fri, 15 Jul 2016 02:52:13 +0000 (11:52 +0900)]
Use stdbool instead of macro for boolean

Change-Id: I6d95a582cd8d2ec52adb314a167bd42dd386ac0b
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRevert "change installer smack label from User to System" 81/76681/1 accepted/tizen/common/20160627.191844 accepted/tizen/ivi/20160627.090755 accepted/tizen/mobile/20160627.090706 accepted/tizen/tv/20160627.090722 accepted/tizen/wearable/20160627.090736 submit/tizen/20160627.012303
Dongsun Lee [Mon, 27 Jun 2016 01:09:00 +0000 (10:09 +0900)]
Revert "change installer smack label from User to System"

This reverts commit d1da2aa31e64a93d1e1f5b3c7586c6a4186df4f3.
The smack labels of xxx-backend was changed into User label again.

Change-Id: Ic50ef8739d9e39914d518d1e063eec9a62a7831d

8 years agochange installer smack label from User to System 79/75679/1 accepted/tizen/common/20160621.184344 accepted/tizen/ivi/20160622.021544 accepted/tizen/mobile/20160622.021453 accepted/tizen/tv/20160622.021510 accepted/tizen/wearable/20160622.021524 submit/tizen/20160621.040925
Dongsun Lee [Tue, 21 Jun 2016 04:04:32 +0000 (13:04 +0900)]
change installer smack label from User to System

Change-Id: I1522806cb2b7511455821134f8ae42a53a575e6e
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
8 years agoFix SVACE defects 05/61905/1 accepted/tizen/common/20160321.150912 accepted/tizen/ivi/20160321.114455 accepted/tizen/mobile/20160321.114347 accepted/tizen/tv/20160321.114409 accepted/tizen/wearable/20160321.114428 submit/tizen/20160321.065608
Kyungwook Tak [Fri, 11 Mar 2016 06:00:47 +0000 (15:00 +0900)]
Fix SVACE defects

Remove unused values in test code
Handle negative return value from ftell

Change-Id: I331e1335ad900ef9e5ec4523a832ec2c38dfb7f8
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoUse snprintf instead of sprintf to be safe 45/60845/1 accepted/tizen/common/20160303.110357 accepted/tizen/ivi/20160305.090455 accepted/tizen/mobile/20160305.090405 accepted/tizen/tv/20160305.090421 accepted/tizen/wearable/20160305.090436 submit/tizen/20160303.045232
Kyungwook Tak [Wed, 2 Mar 2016 11:45:52 +0000 (20:45 +0900)]
Use snprintf instead of sprintf to be safe

Change-Id: I664d9f039b09b576c4ebe84c29d8a7c459bc1384
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRefine spec file 44/60844/1
Kyungwook Tak [Wed, 2 Mar 2016 11:13:42 +0000 (20:13 +0900)]
Refine spec file

- Fix groups
- Remove non-used definition
- Use macros

Change-Id: I109ebe1280138c23bbd12f7f97e7665110cdd646
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoAdd gitignore file 43/60843/1
Kyungwook Tak [Wed, 2 Mar 2016 11:06:36 +0000 (20:06 +0900)]
Add gitignore file

Change-Id: I79f9c4e40c72bcbe29fd1bb662566a7c614cb2ca
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
8 years agoRemove tz platform config devel dependency 13/54213/1 accepted/tizen/ivi/20160218.024024 accepted/tizen/mobile/20151214.233512 accepted/tizen/tv/20151214.233528 accepted/tizen/wearable/20151214.233541 submit/tizen/20151214.075511 submit/tizen_common/20151229.142028 submit/tizen_common/20151229.144031 submit/tizen_common/20151229.154718 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000003
Kyungwook Tak [Mon, 14 Dec 2015 07:00:28 +0000 (16:00 +0900)]
Remove tz platform config devel dependency

Change-Id: I37a0eb70b2a89f5deb86d312473d31533bb8a4a2
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
9 years agochange ckmc_owner_id_system to ckmc_owner_id_system 93/48493/2 accepted/tizen/mobile/20150922.232559 accepted/tizen/tv/20150922.232608 accepted/tizen/wearable/20150922.232623 submit/tizen/20150922.074747 submit/tizen_common/20151015.190624 submit/tizen_common/20151019.135620 tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
Dongsun Lee [Tue, 22 Sep 2015 07:34:18 +0000 (16:34 +0900)]
change ckmc_owner_id_system to ckmc_owner_id_system

Change-Id: I80623a8502d4a443718e5ecf449818fc75e731c1
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
9 years agoChange alias because wrt-installer backend runs with owner uid 13/48413/1 accepted/tizen/mobile/20150922.001121 accepted/tizen/tv/20150922.001137 accepted/tizen/wearable/20150922.001155 submit/tizen/20150921.104519
Dongsun Lee [Mon, 21 Sep 2015 10:43:09 +0000 (19:43 +0900)]
Change alias because wrt-installer backend runs with owner uid

Change-Id: Icee00ba20a651600bb64ed045910fddba9bf915b
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
9 years agochange API signatures to support GLOBAL app and NORMAL app at the same time 07/46007/2 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150820.115727 accepted/tizen/tv/20150820.115853 accepted/tizen/wearable/20150820.115949 submit/tizen/20150820.083859 submit/tizen/20150820.084129 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release
Dongsun Lee [Thu, 13 Aug 2015 07:35:58 +0000 (16:35 +0900)]
change API signatures to support GLOBAL app and NORMAL app at the same time

Change-Id: Ic9a60b295bff13bb59c1c6990dfbad569e92c267
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
9 years agobug fix in test codes for 64bit build 27/44627/1 accepted/tizen/mobile/20150724.055328 accepted/tizen/tv/20150724.055342 accepted/tizen/wearable/20150724.055402 submit/tizen/20150724.052048
Dongsun Lee [Fri, 24 Jul 2015 05:17:54 +0000 (14:17 +0900)]
bug fix in test codes for 64bit build

Change-Id: If64499d0636ea6a08d9a96f73f83fa7d57d858e4
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
9 years agoinitial version 75/39875/8
Dongsun Lee [Tue, 26 May 2015 00:42:38 +0000 (09:42 +0900)]
initial version

Change-Id: Ibb7891bee67bdd82f34187f5da2fc3c4bbfa8fcd
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
9 years agoInitial empty repository master
Jeonghoon Jeon [Tue, 17 Mar 2015 02:35:01 +0000 (19:35 -0700)]
Initial empty repository