platform/core/security/tef-simulator.git
6 years agoUpload new version of TAPackageManager 87/175787/1
r.tyminski [Thu, 12 Apr 2018 08:22:34 +0000 (10:22 +0200)]
Upload new version of TAPackageManager

Change-Id: Idb92f039a132dca75e0ef9ef161f27c1e1cf2d56

6 years agoCheck TEE name again 97/173997/3
Krzysztof Dynowski [Tue, 27 Mar 2018 10:28:19 +0000 (12:28 +0200)]
Check TEE name again

Change-Id: I4dfb4511da9ec8dc8bf496e32b22dcbc9ee62c76

6 years agoRecreate the link to tastore during rpm update 83/173983/2
Krzysztof Jackiewicz [Tue, 27 Mar 2018 09:37:24 +0000 (11:37 +0200)]
Recreate the link to tastore during rpm update

The link to tastore was only created during rpm installation. However, the path
to tastore has changed since the last release and the link should be recreated
during rpm update as well.

This commit makes the rpm update recreate the link so that it points to the
valid tastore directory.

Change-Id: I545461b058eb966e2c24a4f1752b241948e5134c

6 years agoMerge "Use cond to wait for new command and not waste 100% CPU" into tizen
Krzysztof Dynowski [Tue, 27 Mar 2018 11:36:17 +0000 (11:36 +0000)]
Merge "Use cond to wait for new command and not waste 100% CPU" into tizen

6 years agoStart TEF simulator on install 43/171843/6
Lukasz Kostyra [Wed, 7 Mar 2018 14:51:39 +0000 (15:51 +0100)]
Start TEF simulator on install

Change-Id: Iab1da43900b7077921c77d2852a0f4354e17b39d
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
6 years agoUse cond to wait for new command and not waste 100% CPU 49/173749/1
Krzysztof Dynowski [Wed, 21 Mar 2018 13:00:18 +0000 (14:00 +0100)]
Use cond to wait for new command and not waste 100% CPU

Change-Id: I0e263861c83a6feeef203c14576dc4793aede87b

6 years agoADD RPMB define 05/171305/4
Inho Kim [Fri, 3 Nov 2017 02:43:37 +0000 (11:43 +0900)]
ADD RPMB define

Change-Id: I86227f03fe16e6ec603f8e4731829264cc782879

6 years agoRemove TEEName check for compatibility with target 04/171304/3
Inho Kim [Mon, 23 Oct 2017 02:56:23 +0000 (11:56 +0900)]
Remove TEEName check for compatibility with target

Change-Id: Ia624b138683ec4c3f8f8116ca6ac765abf015bb0

6 years agoFix socket activation 42/171842/3
Krzysztof Jackiewicz [Wed, 7 Mar 2018 14:45:50 +0000 (15:45 +0100)]
Fix socket activation

Both the service and the socket were bound to each other (BindsTo) making it
impossible to stop only one of them.

This change removes the BindsTo entries to allow socket to run when the service
is down.

Change-Id: I9c22acca4c8730729f332e4f3b1f8fb6d7a0cfc7

6 years agoFix bits/bytes error in TEE_InitRefAttribute 67/170267/2
Krzysztof Jackiewicz [Fri, 16 Feb 2018 11:09:52 +0000 (12:09 +0100)]
Fix bits/bytes error in TEE_InitRefAttribute

According to TEE spec TEE_InitRefAttribute() should treat the length argument
as a length in bytes not bits.

This commit adjusts all TEE_InitRefAttribute() invocations and
TEE_Attribute::content.ref.length referencese to use length in bytes.

Change-Id: I84f7cce90987c69453b2dda5071dfd9c1ee3f3b4

6 years agofix: Remove memory leak in TEE_Realloc 39/169839/2
Radoslaw Bartosiak [Fri, 9 Feb 2018 13:23:37 +0000 (14:23 +0100)]
fix: Remove memory leak in TEE_Realloc

When a not NULL buffer's size was changed to 0

Change-Id: Icee13f84e82bc91c6ed9a321e94631747fcc703e
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
6 years agoFix Manifest parse error 71/159671/5
Inho Kim [Thu, 26 Oct 2017 06:40:34 +0000 (15:40 +0900)]
Fix Manifest parse error

Change-Id: Ieea75c888b06806b7999381d79086aacad896c76

6 years agoFix TEE_GetPropertyName 06/171106/4
Krzysztof Dynowski [Mon, 26 Feb 2018 11:05:04 +0000 (12:05 +0100)]
Fix TEE_GetPropertyName

Change-Id: I9e6695059b312124cb25cf96e6e7ee731dbf3759

6 years agoDownloadable TA support 53/170253/7
Krzysztof Dynowski [Thu, 15 Feb 2018 12:13:27 +0000 (13:13 +0100)]
Downloadable TA support

Change-Id: Ic80740993dd815b6acffd42241046f934249ae03

6 years agoFix return origin in open command 45/170845/4
Krzysztof Dynowski [Thu, 22 Feb 2018 14:47:20 +0000 (15:47 +0100)]
Fix return origin in open command

Change-Id: Iddc7ede6fe28fee099a0e33bb2e786461266fffc

6 years agoFix bug in checkTADomain function 67/159667/6
inho1220.kim [Wed, 26 Jul 2017 07:34:00 +0000 (16:34 +0900)]
Fix bug in checkTADomain function

 - TC TEE_core/4 is failed. (OpenSession with Invalid UUID)
 need to check NULL.

Change-Id: I61f2996ec3443703afdafdeeb712ea8dc20fa35f

6 years agofix simuldaemon crash 66/159666/7
leejungkyuen [Thu, 26 Oct 2017 03:49:13 +0000 (12:49 +0900)]
fix simuldaemon crash

Change-Id: Ia1dcdfcefc0285b3104119c94429dcac95095ccb

6 years agoFix reset property 31/170831/4
Krzysztof Dynowski [Thu, 22 Feb 2018 11:22:18 +0000 (12:22 +0100)]
Fix reset property

Change-Id: I027f13e452663fe6fd1547bb64fd88026c6f42c7

6 years agoEmbedded path configuration 31/170231/3
Krzysztof Dynowski [Wed, 14 Feb 2018 13:07:58 +0000 (14:07 +0100)]
Embedded path configuration

Change-Id: I7ae530892a878a5009cab75e0610056c42f4ce59

6 years agoFix return origin in invoke command 33/170133/4
Krzysztof Dynowski [Tue, 13 Feb 2018 09:17:13 +0000 (10:17 +0100)]
Fix return origin in invoke command

Change-Id: If392e598ff6f3accec83c639a868eb3ba895c09c

6 years agoFix TA file names, remove dash (-) 04/170704/1
Krzysztof Dynowski [Tue, 13 Feb 2018 09:15:32 +0000 (10:15 +0100)]
Fix TA file names, remove dash (-)

Change-Id: Iec46e9fd2012b1e2c7c135b139db27c937b2f7b3

6 years agoSeparate extract path support 32/170132/3
Krzysztof Dynowski [Tue, 13 Feb 2018 09:15:32 +0000 (10:15 +0100)]
Separate extract path support

Change-Id: I0741a959e01858941e3e5a23e5f032f237af2a33

6 years agoChange sock/log to /var/{run,log}, tastore/storage to /opt/usr/apps/ta_sdk/{tee,data} 03/167403/5
Krzysztof Dynowski [Tue, 16 Jan 2018 11:28:37 +0000 (12:28 +0100)]
Change sock/log to /var/{run,log}, tastore/storage to /opt/usr/apps/ta_sdk/{tee,data}

Change-Id: Ieb32041f41e71db5e8f6b8bf39d2287a43a5c4c7

6 years agoReturn error TEEC_ERROR_OUT_OF_MEMORY if requested size too large 74/167274/1
Krzysztof Dynowski [Tue, 16 Jan 2018 14:02:25 +0000 (15:02 +0100)]
Return error TEEC_ERROR_OUT_OF_MEMORY if requested size too large

Change-Id: Ia1f87109c2a1444f7491489b84e0d2633c07b61e

6 years agoInitialize shared->buffer with NULL 61/167261/1
Krzysztof Dynowski [Tue, 16 Jan 2018 11:30:17 +0000 (12:30 +0100)]
Initialize shared->buffer with NULL

Change-Id: Ia6bf28f88d9ec05cfdb941f82687f9d061312b1e

6 years agofix SHM path, remove unused code, replace system wih boost API (for simple cases) 59/166959/5
Krzysztof Dynowski [Thu, 11 Jan 2018 15:37:10 +0000 (16:37 +0100)]
fix SHM path, remove unused code, replace system wih boost API (for simple cases)

Change-Id: I1a3e868fe11de69cae5ac6740ebe75b64ff4297e

6 years agoDelete duplicate macros, move them to one config.h 91/162791/6
leejungkyuen [Wed, 26 Jul 2017 06:58:50 +0000 (15:58 +0900)]
Delete duplicate macros, move them to one config.h

Change-Id: Idbebaec899d491786402172e5e9a554a72e8e45c

6 years agofix: check context before use (where missing) 36/166736/2
Krzysztof Dynowski [Wed, 3 Jan 2018 10:50:25 +0000 (11:50 +0100)]
fix: check context before use (where missing)

Change-Id: I6494cffdfb77bda7cc191a0be76f350b79322568

6 years agoRedirect TA output to file before posix_spawn (append mode) 78/157878/5
Lukasz Kostyra [Thu, 26 Oct 2017 15:08:08 +0000 (17:08 +0200)]
Redirect TA output to file before posix_spawn (append mode)

Change-Id: Ic9e8853b86029badee226a6b263254102b98dc1c

6 years agoremove postProc when preProc failed, minor optimalizations 55/164155/4
Krzysztof Dynowski [Thu, 7 Dec 2017 15:34:10 +0000 (16:34 +0100)]
remove postProc when preProc failed, minor optimalizations

Change-Id: I831e26f8c237b675f668d4a13002b5cd88dd7411

6 years agofix TA paths, use unique_ptr for memory managment 54/164154/3
Krzysztof Dynowski [Mon, 4 Dec 2017 16:49:08 +0000 (17:49 +0100)]
fix TA paths, use unique_ptr for memory managment

Using unique_ptr requires -std=c++1y compiler flag

Change-Id: I463ed5616e623f4362906e469e134fee3679f7a2

6 years agofix simulator libteec link options 53/164153/1
Krzysztof Dynowski [Thu, 7 Dec 2017 15:32:46 +0000 (16:32 +0100)]
fix simulator libteec link options

Change-Id: I7ef51f6bd117f86b353d201b6f4af4ea14022eca

6 years agoAdd Kerberos MIT license for cc_sha1.c 80/162480/2 accepted/tizen/unified/20171205.155606 submit/tizen/20171205.070457
Krzysztof Jackiewicz [Fri, 1 Dec 2017 13:27:42 +0000 (14:27 +0100)]
Add Kerberos MIT license for cc_sha1.c

Change-Id: I90800e874a7a0fba35d9410abf90349a01461907

6 years agoFix license issues 25/162125/4
Krzysztof Jackiewicz [Wed, 29 Nov 2017 07:43:53 +0000 (08:43 +0100)]
Fix license issues

- Include rapidxml license (MIT) and install it with rpms
- Merge 3 directories with rapidxml into one
- Add missing license boilerplate (BSD) to include/include/tee_internal_api.h.
  The file comes from optee_os but it was apparently modified.
- Install BSD license with devkit rpm
- Update License tags in spec files
- Install Apache license with all rpms (including hello world)

Change-Id: I2c5ab649c4e81c469a138b04ec9be8a09c1f0ae4

6 years agoFix operation processing - add missing breaks 62/162162/1
Tomasz Swierczek [Wed, 29 Nov 2017 08:03:53 +0000 (09:03 +0100)]
Fix operation processing - add missing breaks

One of previous commits removed break statements in case
which leads to TA panic in tef-simulator (key-manager-ta backend
was hanging because of this)

Change-Id: I1d12d600ae5bfec8ee4817e1669590b7703243a0

6 years agoIn case of OpenSession success return TRUSTED_APP origin 50/162050/2
Tomasz Swierczek [Tue, 28 Nov 2017 19:07:11 +0000 (20:07 +0100)]
In case of OpenSession success return TRUSTED_APP origin

This commit is a workaround of the fact that daemon is not passing
data properly between its classes and client library.

Change-Id: I3e52606d646c7f9e6d574582b7233aefbc252338

6 years agoRework get_base_path for buffer overflows 76/161676/6
Igor Kotrasinski [Fri, 24 Nov 2017 14:23:19 +0000 (15:23 +0100)]
Rework get_base_path for buffer overflows

Change-Id: I4c513d32eb22700d2c835d6e12f35234b3ffce0f
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
6 years agoRework get_data_name for buffer overflows 71/161671/6
Igor Kotrasinski [Fri, 24 Nov 2017 13:48:30 +0000 (14:48 +0100)]
Rework get_data_name for buffer overflows

Change-Id: I8142537acfeb81d1a00bbc4cdc3222f83b493ae8
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
6 years agoFix SVACE warnings 67/161667/5
Igor Kotrasinski [Fri, 24 Nov 2017 12:41:50 +0000 (13:41 +0100)]
Fix SVACE warnings

Change-Id: I85a015621302baac06e48cc0cffd5e2390495bf5
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
6 years agoFix C++Test static analysis violations 97/159697/17
Uladzislau Harbuz [Fri, 10 Nov 2017 17:23:01 +0000 (18:23 +0100)]
Fix C++Test static analysis violations

Change-Id: Ia458bb472af6f3cd18cc9dd1ccaacb9bc7558805

6 years agoMerge "Remove dead code related to downloadable TA" into tizen
Piotr Sawicki [Thu, 23 Nov 2017 14:42:26 +0000 (14:42 +0000)]
Merge "Remove dead code related to downloadable TA" into tizen

6 years agoSend (correct) response to client when cynara danied access 59/160159/5
Krzysztof Dynowski [Tue, 14 Nov 2017 14:27:02 +0000 (15:27 +0100)]
Send (correct) response to client when cynara danied access

Change-Id: I53b11b0149725dc88679febb6706af42b8d37cb3

6 years agoAdd stub PrintLog function 09/159909/4
akoszewski [Fri, 10 Nov 2017 11:43:23 +0000 (12:43 +0100)]
Add stub PrintLog function

Add stub PrintLog function in release tef-simulator
to fix error with loading debug TA by release tef simulator

Change-Id: Ia673fbb615baaff9834c339ce965baad5317a444

6 years agoFix TEEC operation preprocessing 65/158065/5
akoszewski [Fri, 27 Oct 2017 13:25:02 +0000 (15:25 +0200)]
Fix TEEC operation preprocessing

TEEC Operation arguments are now parsed properly.

Change-Id: I91a811158b118066a2377a1d47eec36b9e8e03ac

6 years agoFix smack labels on tef-simulator files 07/159407/3
akoszewski [Mon, 6 Nov 2017 14:25:13 +0000 (15:25 +0100)]
Fix smack labels on tef-simulator files

Change-Id: I7964f1b1545c9961e499755562c827eb6e9d3992

6 years agoRemove dead code related to downloadable TA 82/157482/3
Uladzislau Harbuz [Tue, 24 Oct 2017 15:40:16 +0000 (17:40 +0200)]
Remove dead code related to downloadable TA

Change-Id: Ieff27f29b34432c0d572b85a652c05246541a9eb

6 years agoFix coding style in C files 48/157448/6 accepted/tizen/4.0/unified/20171026.152951 accepted/tizen/unified/20171025.075227 submit/tizen/20171024.152749 submit/tizen_4.0/20171024.152729 tizen_4.0.IoT.p2_release tizen_4.0.m2_release
Tomasz Swierczek [Tue, 24 Oct 2017 11:00:01 +0000 (13:00 +0200)]
Fix coding style in C files

Change-Id: I5855f086706db38236e09f6fca7d7314339bead6

6 years agoSVACE: fix NO_CATCH 11/157411/2
Krzysztof Dynowski [Tue, 24 Oct 2017 10:38:51 +0000 (12:38 +0200)]
SVACE: fix NO_CATCH

Change-Id: I91ebb7616216d26f68599513c257fad26a272f5b

6 years agoRework char to hex conversion 02/157402/2
Igor Kotrasinski [Tue, 24 Oct 2017 09:41:51 +0000 (11:41 +0200)]
Rework char to hex conversion

Remove unnecessary 22-case switch.

Change-Id: Id9b07c7893b498642032bee24edd5a7d857718aa
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
6 years agoFix InitContextData passed by value 78/157378/3
Igor Kotrasinski [Tue, 24 Oct 2017 09:06:53 +0000 (11:06 +0200)]
Fix InitContextData passed by value

Change-Id: I4ff306def7a002c111a23cbd1bf17ea3d9c863dd
Signed-off-by: Igor Kotrasinski <i.kotrasinsk@partner.samsung.com>
6 years agoFix error checking on msgctl() 01/157401/2
Jaroslaw Pelczar [Tue, 24 Oct 2017 09:34:05 +0000 (11:34 +0200)]
Fix error checking on msgctl()

Change-Id: I53fcdb05c3567e12b42a2ad7a11536e875f972cf
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agodisconnectfromServer: fix socket fd validity condition 00/157400/2
Jaroslaw Pelczar [Tue, 24 Oct 2017 09:12:33 +0000 (11:12 +0200)]
disconnectfromServer: fix socket fd validity condition

Change-Id: I71e566e7c791cc5dd10724210a477a20f88ba5ad
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoWRONG_ARGUMENTS_ORDER - SVACE related fixes 99/157399/2
Mariusz Domanski [Tue, 24 Oct 2017 08:56:28 +0000 (10:56 +0200)]
WRONG_ARGUMENTS_ORDER - SVACE related fixes

Change-Id: I873b75218372ea4e3396797c99a3e887701f818d

6 years agoSVAVE: fix INVARIANT_RESULT.OP_ASSIGN, NULL_AFTER_DEREF 89/157389/2
Krzysztof Dynowski [Tue, 24 Oct 2017 09:39:58 +0000 (11:39 +0200)]
SVAVE: fix INVARIANT_RESULT.OP_ASSIGN, NULL_AFTER_DEREF

Change-Id: I9b5a4854f2ad9ff703e036425f7ccf09ea45c888

6 years agoSVACE: fix DEREF_OF_NULL* warning 76/157376/6
Krzysztof Dynowski [Tue, 24 Oct 2017 09:03:59 +0000 (11:03 +0200)]
SVACE: fix DEREF_OF_NULL* warning

Change-Id: I7a9b30bcafea43a61addb0f2e8fd899717bce7e1

6 years agoMake changing of shm file mode thread safe 24/157124/4
Piotr Sawicki [Mon, 23 Oct 2017 07:04:14 +0000 (09:04 +0200)]
Make changing of shm file mode thread safe

Change-Id: Id7b07a203878fdf16414c3b3fae281918671d345

6 years agoFix C++ style warnings (CRC) 09/157309/4
Leszek Zygo [Mon, 23 Oct 2017 15:55:49 +0000 (17:55 +0200)]
Fix C++ style warnings (CRC)

Change-Id: Ief75cb7fb549697ddab8cec0c5ebd41c9c1149d8
Signed-off-by: Leszek Zygo <l.zygo@samsung.com>
6 years agoSVACE: fix UNINIT.CTOR 06/157206/2
Krzysztof Dynowski [Mon, 23 Oct 2017 15:41:12 +0000 (17:41 +0200)]
SVACE: fix UNINIT.CTOR

Change-Id: I4029146e8b408e931b0555bd7e9ac8d61722741f

6 years agoSVACE: HEAP_LEAK, correct size in strncpy 57/157157/3
Igor Kotrasinski [Mon, 23 Oct 2017 07:55:27 +0000 (09:55 +0200)]
SVACE: HEAP_LEAK, correct size in strncpy

Change-Id: Ib53c48c7f6ab9aaa1e00ea407bbcad329aa38a3a

6 years agoFix for SVACE NO_CATCH warning 53/157053/3
Jaroslaw Pelczar [Fri, 20 Oct 2017 15:59:20 +0000 (17:59 +0200)]
Fix for SVACE NO_CATCH warning

Change-Id: I6950fab634aa6c6f2c448aaa7cfc0c3a1978c464
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoFix for SVACE DEREF_AFTER_NULL 52/157052/3
Jaroslaw Pelczar [Fri, 20 Oct 2017 15:53:47 +0000 (17:53 +0200)]
Fix for SVACE DEREF_AFTER_NULL

DEREF_AFTER_NULL: After having been compared to NULL value at
ssf_crypto.cpp:1990, pointer 'key1' is dereferenced at
ssf_crypto.cpp:1999.
    [dereference] Dereference at /home/abuild/rpmbuild/BUILD/tef-
simulator-0.0.1/ssflib/src/ssf_crypto.cpp:1999
    [null check] null check at /home/abuild/rpmbuild/BUILD/tef-
simulator-0.0.1/ssflib/src/ssf_crypto.cpp:1990

Change-Id: Iaf1ed9dd32b30bc958a91ac1a30382c71b3d4b43
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoSVACE warnings fixed for HEAP_INCOMPATIBLE.FREE 51/157051/3
Jaroslaw Pelczar [Fri, 20 Oct 2017 15:44:20 +0000 (17:44 +0200)]
SVACE warnings fixed for HEAP_INCOMPATIBLE.FREE

Change-Id: Ib7f2d61d1aaedb48b4f8c0de045d761119f15355
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
6 years agoAll TAs should be loaded from sytem TA store. Licence fixes. Client library fixes. 51/156851/4 accepted/tizen/unified/20171020.160207 submit/tizen/20171020.123639 submit/tizen_4.0/20171020.123601
Tomasz Swierczek [Fri, 20 Oct 2017 07:16:01 +0000 (09:16 +0200)]
All TAs should be loaded from sytem TA store. Licence fixes. Client library fixes.

Change-Id: Ic106b3c21b22e72f3eaf622cb3d5da6aeb7d827f

6 years agoModify tef-simulator service and socket to start at boot. 70/156170/4 accepted/tizen/4.0/unified/20171018.232210 accepted/tizen/unified/20171018.165615 submit/tizen/20171018.143448 submit/tizen_4.0/20171018.143642
r.tyminski [Tue, 17 Oct 2017 10:17:00 +0000 (12:17 +0200)]
Modify tef-simulator service and socket to start at boot.

Bind service and socket to each other to stop one when use stop other.

Change-Id: Ib94f4eb99508f6165df3cba40b333f2180a2bf9f

6 years agoLink tastore directory to /opt. 68/156168/7
r.tyminski [Tue, 17 Oct 2017 10:13:01 +0000 (12:13 +0200)]
Link tastore directory to /opt.

Simulator unpack TA, by create directory in TA path. We need to move
tastore directory to the path with write permissions.

Change-Id: I06c73e2236ac01add896f4fc428a2d6b009d0156

6 years agoReduce Capabilities set of tef-simulator to none. 52/154052/13
Wojciech Chrobot [Thu, 5 Oct 2017 13:32:48 +0000 (15:32 +0200)]
Reduce Capabilities set of tef-simulator to none.

During installation set simulator as a tef backend using tef_update.sh.
Reduce root user. Currently user is the security_fw user and group.
Change ownership of /usr/lib/tastore directory and helloworld TA to security_fw.
Change permissions to user/group/others of helloworld TA and tastore directory.

Change-Id: I6fa65ba97d82784968134be58a60e7a435d90b38

6 years agoMerge "teec: Fix temp memory allocation" into tizen
Krzysztof Dynowski [Thu, 12 Oct 2017 13:25:46 +0000 (13:25 +0000)]
Merge "teec: Fix temp memory allocation" into tizen

6 years agoAdd missing dlog dependency to TEECLib 94/155194/1
Piotr Sawicki [Thu, 12 Oct 2017 09:04:58 +0000 (11:04 +0200)]
Add missing dlog dependency to TEECLib

Change-Id: I49a216ebe9b0b0201bca2492625de9ccef7bd5fc

6 years agoteec: Fix temp memory allocation 02/155002/2
Lukasz Kostyra [Wed, 11 Oct 2017 16:26:48 +0000 (18:26 +0200)]
teec: Fix temp memory allocation

When allocating shared memory for temp memory reference in operation,
TEECLib didn't set proper memory flag. This caused an error during
operation pre-processing.

Change-Id: I8b1fa13ac5d8feca1f596f514ab40e3f03d2198c

6 years agoFix error checking for socket fd 77/150777/4 accepted/tizen/4.0/unified/20171011.150507 accepted/tizen/unified/20171011.150601 submit/tizen/20171011.101248 submit/tizen_4.0/20171011.101309 tizen_4.0.IoT.p1_release
akoszewski [Mon, 18 Sep 2017 12:22:45 +0000 (14:22 +0200)]
Fix error checking for socket fd

This is needed for cases when socket fd is equal to 0

Change-Id: Idb5926594f47cfad21fb8c6cc36a3b815ef667a0

6 years agoEnable ASLR 40/154540/1
Lukasz Kostyra [Tue, 10 Oct 2017 10:56:59 +0000 (12:56 +0200)]
Enable ASLR

Change-Id: Idaa63fdf80a8252a931685040481e6763358feb1

6 years agolog: Enable dlog logging on Tizen platform 17/154417/1
Lukasz Kostyra [Wed, 27 Sep 2017 09:59:23 +0000 (11:59 +0200)]
log: Enable dlog logging on Tizen platform

Additionally minor changes were added to make 3.0 building possible

Change-Id: Ieae9cdd7e742ca909506a9748bf4cd208247f559

6 years agoFix for x64 build accepted/tizen/4.0/unified/20171010.064041 accepted/tizen/unified/20171010.063653 submit/tizen/20171006.165644 submit/tizen_4.0/20171006.170606
Tomasz Swierczek [Fri, 6 Oct 2017 16:35:29 +0000 (18:35 +0200)]
Fix for x64 build

Invalid typecast for socklen_t.

Change-Id: Iff4034251f1c3db9a425934949ca3506767eb5ae

6 years agoRevert "log: Enable dlog logging on Tizen platform" 42/154142/1 submit/tizen/20171006.161413 submit/tizen_4.0/20171006.161525
Tomasz Swierczek [Fri, 6 Oct 2017 14:03:35 +0000 (16:03 +0200)]
Revert "log: Enable dlog logging on Tizen platform"

Tizen 5.0 build was broken due to duplicated DLOG-like macros.

This reverts commit 28c5b25f3aa2a692a5252ca52cd30e6625d6f769.

Change-Id: I5df8ebdb4c090b45af94fc813b567fe406fce2e4

6 years agoFix shared memory implementation 56/153856/2 submit/tizen/20171006.123809 submit/tizen_4.0/20171006.123936
Piotr Sawicki [Mon, 2 Oct 2017 06:01:52 +0000 (08:01 +0200)]
Fix shared memory implementation

* remove unused structure
* Adapt deleteAllSharedMemory() to POSIX API

Change-Id: Ia0e58cfbf35ef57b495d8bf64dacc83fc8fec61d

6 years agoTEEStub: Use TA executable path to find manifest 58/154058/3
Lukasz Kostyra [Thu, 5 Oct 2017 16:26:08 +0000 (18:26 +0200)]
TEEStub: Use TA executable path to find manifest

When launching downloadable TAs, TEEStub still attempted to
search for TA's manifest on system TA store, which resulted
in crashing TA and failing OpenSession call.

TEEStub now uses argv[0] to extract both UUID and home directory
of TA, which are used to open manifest file.

Change-Id: I7c1037ccc34574517a882c4f3e6532199a6d64f1

6 years agoTEEStub: Unify logging 57/154057/3
Lukasz Kostyra [Thu, 5 Oct 2017 15:43:57 +0000 (17:43 +0200)]
TEEStub: Unify logging

TEEStub used its own copy of libtef-simulator-log library. The copy
was removed and proper headers were used to have one common logging
platform for the entire project.

Change-Id: I34ad339ccf21b61ae2fc6754dc2332a0c320194b

6 years agolog: Enable dlog logging on Tizen platform 88/153288/3
Lukasz Kostyra [Wed, 27 Sep 2017 09:59:23 +0000 (11:59 +0200)]
log: Enable dlog logging on Tizen platform

Additionally minor changes were added to make 3.0 building possible

Change-Id: I06f4aa997af3a5f8c0c1849d062545ff550ac1ee

6 years agoPackageMaker: Provide 32 bit binary on 32 bit build 70/153970/3
Lukasz Kostyra [Wed, 4 Oct 2017 08:48:19 +0000 (10:48 +0200)]
PackageMaker: Provide 32 bit binary on 32 bit build

Change-Id: Ia3d98056e3f4a857592d95eee546aa11e04334ed

6 years agoFix looking for TA in res/tee/ 96/151696/13
akoszewski [Thu, 21 Sep 2017 13:41:07 +0000 (15:41 +0200)]
Fix looking for TA in res/tee/

Search for TA is now non recursive

Change-Id: Ibc1b1e724a6a2762840e72ff9ec43ff1cba4eb35

6 years agoFix error codes for TEEContext 70/151370/5
akoszewski [Wed, 20 Sep 2017 13:52:43 +0000 (15:52 +0200)]
Fix error codes for TEEContext

Change-Id: I58c5af3934f55cf06eb0d26211a343a5c079d915

6 years agoFix path to TA checking 18/151318/7
akoszewski [Tue, 19 Sep 2017 16:30:51 +0000 (18:30 +0200)]
Fix path to TA checking

Change-Id: Id8aa25911dfc412e5b7b257707327db113829d5f

6 years agoDestroy tizen context, get right uid of client 53/151053/14
Uladzislau Harbuz [Tue, 19 Sep 2017 12:13:56 +0000 (14:13 +0200)]
Destroy tizen context, get right uid of client

Change-Id: I85cbd1773a304d376c61477e9b1202e366e3f32c

6 years agoRemove UUID list. 93/151693/10
Uladzislau Harbuz [Thu, 21 Sep 2017 11:25:11 +0000 (13:25 +0200)]
Remove UUID list.

Change-Id: Ic4b19d896c962261d4bb3366077459c147babb65

6 years agoReplace sys V shared memory with POSIX shared memory 83/152283/6
Piotr Sawicki [Mon, 25 Sep 2017 12:09:37 +0000 (14:09 +0200)]
Replace sys V shared memory with POSIX shared memory

Change-Id: I1ae2e4a3e6cb9dbee45e5d65b22c1eefe3d4cc65

6 years agoTemporarily disable setting the simulator backend 06/151306/1 accepted/tizen/4.0/unified/20170921.074309 accepted/tizen/unified/20170920.174611 submit/tizen/20170920.110822 submit/tizen_4.0/20170920.110938
Tomasz Swierczek [Wed, 20 Sep 2017 10:58:22 +0000 (12:58 +0200)]
Temporarily disable setting the simulator backend

Backend will have to be enabled once the TCT will be updated to use actual TA
and when emulator images will have the tee feature enabled.

Change-Id: I4405473008fdc0940445b69c35a0e6a66bb0d81e

6 years agoUse tef-update.sh to update tef-libteec configuration 52/150152/1 accepted/tizen/4.0/unified/20170919.172518 accepted/tizen/unified/20170915.192704 submit/tizen/20170914.115510 submit/tizen_4.0/20170918.070112
Lukasz Kostyra [Thu, 14 Sep 2017 11:28:08 +0000 (13:28 +0200)]
Use tef-update.sh to update tef-libteec configuration

Change-Id: I2e8428c673f2e856fca3f8e00f567ad3ef7398af

6 years agoAdd ExcludeArch directives to spec 16/150116/1
Lukasz Kostyra [Thu, 14 Sep 2017 09:27:12 +0000 (11:27 +0200)]
Add ExcludeArch directives to spec

Change-Id: I91b766bf657b08039ef77b86485d700e475382d9

6 years agoFix build break due to warnings on Release configuration 10/150110/2
Lukasz Kostyra [Thu, 14 Sep 2017 08:40:25 +0000 (10:40 +0200)]
Fix build break due to warnings on Release configuration

Change-Id: Ie27c9585ea7ac2f775a89a88a447e7ef01055d51

6 years agoAdd LICENSE and apply boilerplates to sources 66/150066/1
Lukasz Kostyra [Wed, 13 Sep 2017 11:59:11 +0000 (13:59 +0200)]
Add LICENSE and apply boilerplates to sources

Change-Id: I1d96551efc5a4d3cb5f3a223719851ca166789da

6 years agoAdjust to use tef-libteec 03/149603/3
Lukasz Kostyra [Tue, 12 Sep 2017 13:34:08 +0000 (15:34 +0200)]
Adjust to use tef-libteec

Change-Id: I97a8fa41dc33dd7cbf932ba684b57313519572bf

6 years agoImplement checking of Tizen policies 84/137784/39
u.harbuz [Thu, 24 Aug 2017 07:49:18 +0000 (09:49 +0200)]
Implement checking of Tizen policies

Change-Id: I18d2ef26f63d17b3d97d5af9fbeab0f0db4bc3e1

6 years agoEnable -Werror flag, fix warnings and 64-bit build 73/149573/1
Lukasz Kostyra [Tue, 12 Sep 2017 09:18:38 +0000 (11:18 +0200)]
Enable -Werror flag, fix warnings and 64-bit build

Change-Id: I97c215c91efb2627d93cb98e321c9e6a8875f722

6 years agosimulatordaemon: Integrate with systemd 58/149458/2
Lukasz Kostyra [Mon, 11 Sep 2017 16:59:54 +0000 (18:59 +0200)]
simulatordaemon: Integrate with systemd

Change-Id: Ie613205772ad7dd1fa66d7b75925a2fdd8ea0fef

6 years agossflib: Fix to incorrect nonce len check in auth encryption 42/149142/1
Lukasz Kostyra [Thu, 7 Sep 2017 06:18:40 +0000 (08:18 +0200)]
ssflib: Fix to incorrect nonce len check in auth encryption

Change-Id: Idc4c7a17f219bfc1325b24b14522526d5facbdf1

6 years agossflib: Add support for 4096 bit RSA 41/149141/1
Lukasz Kostyra [Tue, 5 Sep 2017 12:40:03 +0000 (14:40 +0200)]
ssflib: Add support for 4096 bit RSA

GP API assumes that max length for RSA is 2048 bits, however it also
doesn't fully enforce this limit (the implementation can support
bigger RSA keys if needed).

Change-Id: I7dbcd3d933ef4eb8efc5d1432111e1fdf96419fa

6 years agossflib: Enable debug logging in crypto operations 40/149140/1
Lukasz Kostyra [Tue, 5 Sep 2017 11:06:28 +0000 (13:06 +0200)]
ssflib: Enable debug logging in crypto operations

Change-Id: I8539a0aa852c658e5bfb4db8a53fb57b690ac3b5

6 years agoActually undefine source fortification on debug build 57/147157/3
Lukasz Kostyra [Thu, 31 Aug 2017 11:51:14 +0000 (13:51 +0200)]
Actually undefine source fortification on debug build

Appearently -U flag was not passed to preprocessor and had
to be provided in another way. Now _FORTIFY_SOURCE warnings
on debug build will disappear.

Change-Id: I99abde5c72972e7b689b037a4bfcdf15377a8da6

6 years agossflib: Use OpenSSL for missing AES GCM mode 27/144727/5
Lukasz Kostyra [Thu, 17 Aug 2017 12:34:45 +0000 (14:34 +0200)]
ssflib: Use OpenSSL for missing AES GCM mode

CryptoCore library used in Simulator does not support auth cipher
modes like AES GCM. The support was added through OpenSSL library.

Change-Id: I97cb17a954e904dc0a6e7aba1d74c7b8077438d5

6 years agossflib: Remove HW crypto routines 26/144726/2
Lukasz Kostyra [Thu, 17 Aug 2017 09:47:09 +0000 (11:47 +0200)]
ssflib: Remove HW crypto routines

ssflib had various leftovers from old implementation using hardware
to perform crypto operations. The hardware is not supported on simulator,
these code blocks were commented out, or put in "#if 0...#endif" blocks,
so for easier maintenance they were removed.

Change-Id: If1ccb76dce0cb63f567de314acc30e8b83cdd9f5