iotivity.git
2 days agoStatic analyzer issues fixed 86/29486/2 master
Iurii Metelytsia [Wed, 8 May 2019 11:15:38 +0000 (14:15 +0300)]
Static analyzer issues fixed

Change-Id: I175dd965aa0c4d85dd37d5d9b4ece9b4360ff05a
Signed-off-by: Iurii Metelytsia <i.metelytsia@samsung.com>
5 days agowrong conversion fix 00/29500/1
Oleksandr Dmytrenko [Wed, 15 May 2019 06:18:37 +0000 (09:18 +0300)]
wrong conversion fix

error: invalid conversion from 'int64_t {aka long int}' to 'CborError'

Change-Id: Ifbc8e51104fe5af0904b74a927179347e2207073
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
10 days agotizen: Intial packaging of googletest-1.7.0 35/23135/18
Philippe Coval [Fri, 10 Nov 2017 16:42:06 +0000 (17:42 +0100)]
tizen: Intial packaging of googletest-1.7.0

Formerly know as gtest,

Change-Id: If95d302cbfd47ba3d63c6acbd008d6b01d0a3ec3
Bug-IoTivity: https://jira.iotivity.org/browse/IOT-2241
Bug-Tizen: https://bugs.tizen.org/browse/SO-1063
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
3 weeks agombedtls error and verify info logging 60/29460/1
Oleksandr Dmytrenko [Thu, 25 Apr 2019 07:40:19 +0000 (10:40 +0300)]
mbedtls error and verify info logging

Added macroses for:
1) mbedtls error logging
2) verify info logging

Change-Id: I9ee474ff8b2ec3ab40dded3af6d208c780d4d3d4
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 weeks agoFIX static analyzer issue 55/29455/2
i.metelytsia [Tue, 23 Apr 2019 11:09:10 +0000 (14:09 +0300)]
FIX static analyzer issue

    - roleresource.c : sscanf function call has been replaced with strtol

Change-Id: I890548b946a8d27026a85ebd3bbad610d5b39a32
Signed-off-by: i.metelytsia <i.metelytsia@samsung.com>
3 weeks agoocpayloadparse fixed 39/29439/4
Oleksandr Dmytrenko [Tue, 16 Apr 2019 08:15:52 +0000 (11:15 +0300)]
ocpayloadparse fixed

1)error: ISO C++ forbids converting a string constant to 'char*'
2)_POSIX_C_SOURCE redefined(/usr/include/features.h:
        this is the location of the previous definition)

Change-Id: I69edcddf46766cb948deb7c169f2ac727656055f
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 weeks ago[IOT-3261] force content version to 1.0.0 42/29442/4
Nathan Heldt-Sheller [Tue, 16 Apr 2019 22:31:31 +0000 (15:31 -0700)]
[IOT-3261] force content version to 1.0.0

IoTivity should never send Content-Format-Version or
Content-Format-Accept-Version higher than 1.0.0 (per
Specification 2.0.1).  This change forces the outgoing
values to be at most 1.0.0, regardless of what is in
the request header.

Change-Id: I9153993bb8200bb828202c9716dede609fcd5048
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
4 weeks agoFIX for static analyzer tool issues 91/29391/4
i.metelytsia [Mon, 8 Apr 2019 15:38:55 +0000 (18:38 +0300)]
FIX for static analyzer tool issues

Change-Id: I750d0401e0425b92c7a2004e858cf5c09734186f
Signed-off-by: i.metelytsia <i.metelytsia@samsung.com>
4 weeks agounused crl api 37/29437/2
Oleksandr Dmytrenko [Tue, 16 Apr 2019 07:29:25 +0000 (10:29 +0300)]
unused crl api

unused crl api

Change-Id: Ie0ac82f1aed69a1a4aab325f8d11e6f3d124278e
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
4 weeks agonull reference check in parseInvitePayload 38/29438/2
Oleksandr Dmytrenko [Tue, 16 Apr 2019 07:30:45 +0000 (10:30 +0300)]
null reference check in parseInvitePayload

null reference check in parseInvitePayload

Change-Id: Ibf9377c97678c2eb5def6029e9c742a6f663de4a
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
5 weeks agosecurity provisioning cloud c++ fixs 66/29366/4
Oleksandr Dmytrenko [Tue, 2 Apr 2019 11:31:43 +0000 (14:31 +0300)]
security provisioning cloud c++ fixs

security provisioning cloud c++ fixs

Change-Id: I56f5a67f8f471d935e69cec0527abd7a6a59f686
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
5 weeks agocloud: Update jackson to fix vulnerabities 53/29353/2
Philippe Coval [Tue, 26 Mar 2019 09:56:43 +0000 (10:56 +0100)]
cloud: Update jackson to fix vulnerabities

Change-Id: I6e9035b4f3ac7aa8659ef113b3a5c64d3f08951b
Relate-to: https://nvd.nist.gov/vuln/detail/CVE-2018-12022
Signed-off-by: Philippe Coval <p.coval@samsung.com>
5 weeks agobuild: Update version to 2.0.1 52/29352/2
Philippe Coval [Tue, 26 Mar 2019 09:53:44 +0000 (10:53 +0100)]
build: Update version to 2.0.1

Change-Id: I2d8948a0d27c177bee8f5ebaf39e120c2e750757
Signed-off-by: Philippe Coval <p.coval@samsung.com>
6 weeks agocc1plus: all warnings being treated as errors fix 55/29355/7
Oleksandr Dmytrenko [Thu, 28 Mar 2019 07:44:47 +0000 (09:44 +0200)]
cc1plus: all warnings being treated as errors fix

1) error: missing initializer for member OicSecKey::len
2) ISO C++ forbids converting a string constant to 'char*'
3) _POSIX_C_SOURCE redefined

Change-Id: Ib74fd60f124d58213afc9855b71c38ba6d00503c
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
6 weeks agocloud provisioning config cb return fix 68/29368/1
Oleksandr Dmytrenko [Wed, 3 Apr 2019 07:09:36 +0000 (10:09 +0300)]
cloud provisioning config cb return fix

cloud provisioning config cb return fix

Change-Id: I59b7fbfb0511ab788494e7ea4cd3790c0a13aecf
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
8 weeks agoChange Access Token Max Value 30/29330/5
Jaehong Jo [Tue, 12 Mar 2019 10:39:07 +0000 (19:39 +0900)]
Change Access Token Max Value

The access token can have a long value.
So length changed from the existing 64 to 1024.

Change-Id: Id03b4c86d78cdfa1108fee5c6029f286704894c4
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
2 months agoUpdated Doxfiles 43/29343/2
Nathan Heldt-Sheller [Tue, 19 Mar 2019 16:19:42 +0000 (09:19 -0700)]
Updated Doxfiles

Two Doxyfiles were updated with changed project number '2.0.1':
resource/docs/c-doc/Doxyfile
resource/docs/cpp-doc/Doxyfile

Change-Id: I47469d39358cb83a290d34cc3532813fcbb68e49
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
2 months ago[IOT-3271] additional policyengine logging 32/29332/2
Nathan Heldt-Sheller [Thu, 14 Mar 2019 04:53:02 +0000 (21:53 -0700)]
[IOT-3271] additional policyengine logging

Added logging to policyengine and removed a corner-case match leftover
from pre-OCF-1.3 wildcard definitions.

Change-Id: I89df91f81ac28d82ad7bf84ab1895d6cb4b75cd5
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
2 months agocredresource fix 11/29311/9
Oleksandr Dmytrenko [Thu, 28 Feb 2019 14:33:32 +0000 (16:33 +0200)]
credresource fix

1) pointer check in CheckSubjectOfCertificate
2) check pointer len before free in FreeCred
3) poniter check & cross init in CmpCredId
4) double call fix in DeInitCredResource
5) new CopyCred
6) return buffer convertion in case calloc
7) CheckSubjectOfCertificate: label 'exit' defined but not used

Change-Id: Ic6b5cfb948505b079f37a6c0b2f2047b25ab5d89
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months ago[IOT-3249] Add oic.wk.mnt to DCR list 28/29328/2 2.0.1-RC0
Oleksandr Andrieiev [Wed, 19 Dec 2018 02:15:52 +0000 (11:15 +0900)]
[IOT-3249] Add oic.wk.mnt to DCR list

Change-Id: I050e6d137782574c5be40f6cb28081738cafe6dd
Signed-off-by: Oleksandr Andrieiev <o.andrieiev@samsung.com>
(cherry picked from commit 17c9e750dd8966bd31aa4ca05f31538e28581f01)

2 months agofix for gcc version 4 and 5 15/29315/2
Oleksandr Dmytrenko [Fri, 1 Mar 2019 12:03:52 +0000 (14:03 +0200)]
fix for gcc version 4 and 5

fix for gcc version 4 and 5

Change-Id: I0d7d020b191c8238e256821a47db0a073649c460
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agostatic_assert macro fix 14/29314/2
Oleksandr Dmytrenko [Fri, 1 Mar 2019 11:59:42 +0000 (13:59 +0200)]
static_assert macro fix

for gcc 4 that macro does not working

Change-Id: I8761605963ae016a83db3df00378f93c4e971753
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agopointer check before dereferensing 09/29309/4
Oleksandr Dmytrenko [Thu, 28 Feb 2019 13:43:33 +0000 (15:43 +0200)]
pointer check before dereferensing

targetId check in PMDeleteFromUUIDList before derefensing

Change-Id: I1b1dae4091c5058d018c5cb472d6db2503fecb40
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agoponter check in secureresourceprovider 10/29310/2
Oleksandr Dmytrenko [Thu, 28 Feb 2019 14:19:05 +0000 (16:19 +0200)]
ponter check in secureresourceprovider

1) removed double check in ProvisionCredentialDosCB1
2) pointer check in registerResultForUnlinkDevices
3) pointer check in SRPGetCredResourceCB

Change-Id: I7227d62034734b5c5207d7e59d69be6de87d4bde
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agomemory leaks fix 20/29320/3
Oleksandr Dmytrenko [Wed, 6 Mar 2019 16:08:06 +0000 (18:08 +0200)]
memory leaks fix

==29556== 68 (64 direct, 4 indirect) bytes in 1 blocks are definitely lost in loss record 291 of 568
==29556==    at 0x4837B85: calloc (vg_replace_malloc.c:752)
==29556==    by 0x36FE93: OICCalloc (oic_malloc.c:102)
==29556==    by 0x2DB355: CBORPayloadToPstatBin (pstatresource.c:450)
==29556==    by 0x2DB160: CBORPayloadToPstat (pstatresource.c:418)
==29556==    by 0x232EA7: ListMethodsHandler (ownershiptransfermanager.c:1073)

Change-Id: I882b145c0ccf86dfce3736fc24e3c3949a3f00ee
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agocrosses initialization fix 07/29307/3
Oleksandr Dmytrenko [Thu, 28 Feb 2019 13:29:17 +0000 (15:29 +0200)]
crosses initialization fix

crosses initialization of OCCallbackData(cbData) fix

Change-Id: I13987d9919059f43b9d69865cf3679d28fe896b9
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agocrosses initialization fix 08/29308/2
Oleksandr Dmytrenko [Thu, 28 Feb 2019 13:38:33 +0000 (15:38 +0200)]
crosses initialization fix

crosses initialization CborValue csrRootMap fix

Change-Id: I7a648d5f88b4e6e8b1ac72437af9e7f65c867403
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agoInitial version of atomic measurement. 17/29317/1
Herve Jourdain [Wed, 19 Dec 2018 07:45:55 +0000 (15:45 +0800)]
Initial version of atomic measurement.

Implementation of atomic measurements in iotivity, including C, C++ and Java/Android APIs.

Change-Id: Idda2f9f39c98b7307de756774186bbd7fddf434d
Signed-off-by: Herve Jourdain <herve.jourdain@beechwoods.com>
(cherry picked from commit e7aa9277995159e287b9739ae5184ec9b6ccae1a)

2 months ago[IOT-3260] Delete roles at the TLS disconnect 32/27932/8
Aleksey Volkov [Thu, 14 Feb 2019 16:08:34 +0000 (18:08 +0200)]
[IOT-3260] Delete roles at the TLS disconnect

Delete all role credentials at the TLS session closure

Change-Id: Ie51722647d31cc0be9650b1cb2586274519cbe00
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
2 months ago[IOT-3260] SSL close callback 21/27921/7
Oleksii Beketov [Thu, 14 Feb 2019 15:52:31 +0000 (17:52 +0200)]
[IOT-3260] SSL close callback

Added callback to return peer's UUID
on SSL connection closure

Change-Id: Ib31250c639b9c2633e1459f0d555424ca429fb26
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
2 months agoIOT-3266 Demote notification-cpp examples 82/29282/2
Mats Wichmann [Tue, 19 Feb 2019 22:12:50 +0000 (15:12 -0700)]
IOT-3266 Demote notification-cpp examples

Change-Id: I29221ed448cd4da877486bdfd04ddfdbaae4b4d8
Signed-off-by: Mats Wichmann <mats@linux.com>
2 months agoPDMClose and createDb change 14/27914/11
Oleksandr Dmytrenko [Wed, 6 Feb 2019 13:09:36 +0000 (15:09 +0200)]
PDMClose and createDb change

removed check the database pointer in PDMClose and createDb

Change-Id: I1c23276769410a79ec35148c189ea5f5dcce6fe4
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 months agojava unsecured build set SECURED=0 01/27901/2
Mats Wichmann [Wed, 30 Jan 2019 17:03:33 +0000 (10:03 -0700)]
java unsecured build set SECURED=0

The current autobuild (CI) for java (linux_unsecured_with_java target)
does not set SECURED=0, probably a holdover from when the default was
an unsecured build. Add SECURED=0 to make sure the Jenkins builds
are testing this combination.

Change-Id: I2db1851c2f9b78a7ffba4474a72c74e5766699d8
Signed-off-by: Mats Wichmann <mats@linux.com>
3 months agocheck pstat in PostProvisioningStatus 19/27919/2
Oleksandr Dmytrenko [Fri, 8 Feb 2019 11:51:10 +0000 (13:51 +0200)]
check pstat in PostProvisioningStatus

check pstat is null before referencing in PostProvisioningStatus

Change-Id: I57c9f5088ceb762930056879c6db16b2b80e9530
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 months ago[Easy Setup] Reject UPDATE on not allowed property 88/27788/4
Abhishek Pandey [Fri, 21 Dec 2018 09:06:57 +0000 (14:36 +0530)]
[Easy Setup] Reject UPDATE on not allowed property

[IOT-3231] https://jira.iotivity.org/browse/IOT-3231
Easy Setup Resource does not reject an UPDATE request to add a new Link

Currently only criteria to reject POST on EasySetup Resource
(/EasySetupResURI) is to check if properties are read-only. However,
the POST request may contain additional properties "href", "rep"
representing a link to be added in collection or any other unsupported
properties. Even though these properties are not updated, success
response is sent to client which is not appropriate and is flagged as
CTT failure.

This patch changes the validation logic on /EasySetupResURI for POST
on baseline interface to allow the POST only if payload contains
the writable property "cn". Update to any other property is rejected.

Change-Id: I33f6e7eda33481fa2137341f93b607a837ff5a87
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
3 months ago[Easy Setup] Check required properties for UPDATE 93/27793/3
Abhishek Pandey [Mon, 24 Dec 2018 10:05:14 +0000 (15:35 +0530)]
[Easy Setup] Check required properties for UPDATE

[IOT-3252]
https://jira.iotivity.org/browse/IOT-3252

Per the WiFiConf Schema, for an UPDATE request:
 "required":["tnn", "wat", "wet"]

This means that all three of these Properties must be in every
UPDATE request. If they are not there, the Device is supposed
to reject the request with a 4.xx error. However, IoTivity
responds with a 2.04 Changed response instead currently.

This patch fixes above issue by checking the POST request
for required properties (tnn, wat, wet). If any of these
are not included in POST request, it will be rejected.

Change-Id: I00f02c93cd273a02706c85c5d236584d45d6ca77
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
3 months agoUnittests extend coverage 18/27918/2
Vitalii Irkha [Thu, 7 Feb 2019 15:16:17 +0000 (17:16 +0200)]
Unittests extend coverage

Added certhelper coverage

Change-Id: I6b1a0882b0ba239f22b0eeded57d8c554944c3f0
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
3 months agonull checks in ocprovisioningmanager 16/27916/4
Oleksandr Dmytrenko [Wed, 6 Feb 2019 16:06:25 +0000 (18:06 +0200)]
null checks in ocprovisioningmanager

Check null before reference

Change-Id: I489b8d3ecb44e6bc9b4999ef1b47bd6b9dbf4362
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 months ago[IOT-3259] Copy corresponding priv key 04/27904/5
Aleksey Volkov [Thu, 31 Jan 2019 10:14:33 +0000 (12:14 +0200)]
[IOT-3259] Copy corresponding priv key

Search for the corresponding private key among
the ASYMMETRIC_KEY type credentials and copy it
to the appropriate SIGNED_ASYMMETRIC_KEY type
credential

Change-Id: I7b2f595671261708dc0a0769cd8ccb72de0918be
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
3 months ago[IOT-3256] uuid with no prefix 00/27900/9
Oleksii Beketov [Wed, 6 Feb 2019 14:50:06 +0000 (16:50 +0200)]
[IOT-3256] uuid with no prefix

If CN has no "uuid:" or "userid:" prefix, treat whole CN as uuid

Change-Id: I3e90f2a65f3a82c861c28284ca32fd95e9a4cd23
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Bug: https://jira.iotivity.org/browse/IOT-3256

3 months agoUnittests increase coverage 70/27870/8
Vitalii Irkha [Mon, 21 Jan 2019 09:28:11 +0000 (11:28 +0200)]
Unittests increase coverage

Increase coverage

Change-Id: I838b726e26cf0e54fa67cfd383ed350d4b72fc94
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
3 months ago[IOT-3256] Change log level 06/27906/3
Aleksey Volkov [Thu, 31 Jan 2019 15:30:47 +0000 (17:30 +0200)]
[IOT-3256] Change log level

Switch log level from ERROR to DEBUG
in the IsEmptyCred() implementation
due to misinterpretationq

Change-Id: I7124299fcc210c0531c28c0cceb31070cbd601a4
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
3 months agoFix missing initializer in PinOxmData 08/27908/3
Vitalii Irkha [Fri, 1 Feb 2019 09:24:47 +0000 (11:24 +0200)]
Fix missing initializer in PinOxmData

Added initializer for newDevice member

Change-Id: I71b300b6def75fb282fccdcdc7b55a020b91c976
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
3 months agoBuild fix if flags SECURED=0 WITH_CLOUD=1 used 96/27896/5
Vitalii Irkha [Tue, 29 Jan 2019 10:38:33 +0000 (12:38 +0200)]
Build fix if flags SECURED=0 WITH_CLOUD=1 used

Fixed dependencies to cloud library

Change-Id: Idee7ee12f1d3c8bef5cb1b0fa8a599d36320484e
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
3 months agoprovisioning database manager fix 95/27895/3
Oleksandr Dmytrenko [Tue, 29 Jan 2019 10:31:17 +0000 (12:31 +0200)]
provisioning database manager fix

check global the database pointer(p_db) before usage to avoid memory leaks

Change-Id: I55ccf40eb0fa6b32a2467cca7f713bca8b704191
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 months agoFix OCResourceResponseTest warning 85/27485/5
Mats Wichmann [Fri, 16 Nov 2018 17:13:51 +0000 (10:13 -0700)]
Fix OCResourceResponseTest warning

gcc8.1 is fussier about getting strncpy right, as it gripes on this line:

    strncpy(request.query, query, sizeof(query));

It issues this warning:

resource/unittests/OCResourceResponseTest.cpp:83:39: warning: argument to 'sizeof' in 'char* strncpy(char*, const char*, size_t)' call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]

Stack code uses OICStrcpy for safer string copying, but without
fiddling further with dependencies, that function is not available
in this scope, so kept the strncpy but changed the the length
to be based on the destination.

Qualify the two strings with const while we're at it.

Change-Id: I7ed0010a6daeda6f6db4337b9a0babc5e0dce968
Signed-off-by: Mats Wichmann <mats@linux.com>
3 months agoSubjectuuid wildcard fix 92/27892/3
Aleksey Volkov [Mon, 28 Jan 2019 14:17:26 +0000 (16:17 +0200)]
Subjectuuid wildcard fix

subjectuuid field of credential entry is changing in case of it has
'*' or zeroid value and credential type is 'SIGNED_ASYMMETRIC_KEY'.

For the trustca credusage this cause a verification error.

Change-Id: I889d9e982b5be5fea1d872eebb83734288cde3e6
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
3 months agoShow how to make examples non-default 49/27849/3
Mats Wichmann [Thu, 10 Jan 2019 16:46:09 +0000 (09:46 -0700)]
Show how to make examples non-default

A scheme is introduced which allows separating targets indended to
be built by default from ones not intended to be built by default.
One example is converted to show how it works.

Since this makes use of added methods (extending scons' own API),
took the opportunity to properly document these, and added a
documentation file in a new doc subdirectory to make it easier
for developers to find out about these methods.

Also added a debug scheme, which makes it more clear where to
put tracing statements in between the two passes of scons -
the script is invoked at the very end of the scan pass, before
the build pass begins but when everything should be defined.

Change-Id: I0a636fa34c18ace23720f22bfdd8511afa611ddb
Signed-off-by: Mats Wichmann <mats@linux.com>
3 months agosome errors fix 74/27874/5
Oleksandr Dmytrenko [Tue, 22 Jan 2019 13:42:28 +0000 (15:42 +0200)]
some errors fix

crosses initialization and invalid conversion errors fix

Change-Id: I55cce4178f14eb1a7e5b45704650696d18b9ddec
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 months agocrach fix in GetOwnCert 73/27873/2
Oleksandr Dmytrenko [Tue, 22 Jan 2019 13:26:04 +0000 (15:26 +0200)]
crach fix in GetOwnCert

crach fix in GetOwnCert, in debug mode in case null chain

Change-Id: I2c394a1953b8b20015c53607325b5181750bf564
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
3 months ago[IOT-3255] OCF profile CA cert check 71/27871/1
Oleksii Beketov [Mon, 21 Jan 2019 13:29:22 +0000 (15:29 +0200)]
[IOT-3255] OCF profile CA cert check

CA root cert check added to OCF profile chain validation

Change-Id: I4b33d8487f2064cb019dbd25df922b835098a4fc
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Bug: https://jira.iotivity.org/browse/IOT-3255

4 months agoTERM must be set in the environment for gradle. 35/27735/3
Herve Jourdain [Tue, 15 Jan 2019 20:14:26 +0000 (04:14 +0800)]
TERM must be set in the environment for gradle.

Otherwise, Android build fails complaining TERM is not set.

Change-Id: Ibf92b2eca73c71c249d313614ab0ae611ea4f524
Signed-off-by: Herve Jourdain <herve.jourdain@beechwoods.com>
4 months ago[IOT-3245] Update Security OIDs with extra .0 54/27854/3
Jeremy Rover [Fri, 11 Jan 2019 01:23:44 +0000 (17:23 -0800)]
[IOT-3245] Update Security OIDs with extra .0

Change-Id: Ib032c9b2b35b2ef3c23bb9a9cedba46e5aacd4da
Signed-off-by: Jeremy Rover <jeremy.rover@intel.com>
Bug: https://jira.iotivity.org/browse/IOT-3245

4 months agoFixed Android OcPlatform.Shutdown() does not work. 82/27782/2
Herve Jourdain [Thu, 20 Dec 2018 03:31:02 +0000 (11:31 +0800)]
Fixed Android OcPlatform.Shutdown() does not work.

Android OcPlatform.Shutdown() API does not work properly, because in
the case of Android, start() is called twice: once by the Android
Configure API, which is normal and needed, and once by the constructor
for OcPlatform_impl()!
This last one is due to the fact that useLegacyCleanup is still set
to true in the PlatformConfig used by Android, which is one of the
2 non-deprecated ones.
Comments say that the flag is set to false by default, unless a
legacy constructor is used. But this is obviously not a legacy
constructor, and the flag was erroneously set to true...
With this fix, Android OcPlatform.Shutdown() works as expected.

Change-Id: I3db4c37ff17c9f16ea927093c8aa2806e1cabb90
Signed-off-by: Herve Jourdain <herve.jourdain@beechwoods.com>
4 months agoMerge test folder of test branch 98/27798/2
Mushfiqul Islam Antu [Thu, 27 Dec 2018 06:41:57 +0000 (12:41 +0600)]
Merge test folder of test branch

This patch enables all test activities and commits to be
maintained from master branch, instead of test branch.

Change-Id: I2d9123dbd605f0e91eb6d91282057de8735b20a7
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
5 months ago[IOT-3121] Fix rts values of Collection Resource 37/27637/1 feat-linkupdate-and-collection-access-control
Mushfiqul Islam Antu [Fri, 30 Nov 2018 09:13:51 +0000 (15:13 +0600)]
[IOT-3121] Fix rts values of Collection Resource

For baseline response of collection, value of rt & rts
are same for current implementation, which is wrong.
rts should reflect the resource types of the chlidren
of the collection.

Change-Id: Ib4e768c7401247dc9dd4917ff5a611396e8e07a2
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
5 months agoIOT-3244 configurable JMX_HOSTNAME 33/27633/1
Peter Rafaj [Mon, 3 Dec 2018 08:39:14 +0000 (09:39 +0100)]
IOT-3244 configurable JMX_HOSTNAME

Change-Id: I707c2db52492f7585aed307f3a47c6e14824c0b3
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
5 months agoMerge branch 'iotivity-cloud' reverify 85/27585/2 feat-bridging-zigbee
Ondrej [Tue, 27 Nov 2018 06:36:10 +0000 (07:36 +0100)]
Merge branch 'iotivity-cloud' reverify

Change-Id: Iacf81170fac09e4f7e9b7f6f4f51eb0182db1ce3
Signed-off-by: Ondrej Tomcik <ondrej.tomcik@kistler.com>
5 months ago IOT-3234 fix discovery request creating 55/27555/2 iotivity-cloud
Peter Rafaj [Mon, 12 Nov 2018 15:22:03 +0000 (16:22 +0100)]
 IOT-3234 fix discovery request creating

Change-Id: I1a2c2ce90555fa8c7049d0986ac8806c29013f48
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
5 months agoIOT-3234 Add support for new sec URI in AS 53/27553/1
Peter Rafaj [Fri, 23 Nov 2018 11:57:46 +0000 (12:57 +0100)]
IOT-3234 Add support for new sec URI in AS

Change-Id: I1a851e83c2570c736be2b3c7a2172337f8520271
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
5 months ago[IOT-3229] Reset mbedtls verify callback 99/27499/1
Aleksey Volkov [Tue, 20 Nov 2018 08:22:36 +0000 (10:22 +0200)]
[IOT-3229] Reset mbedtls verify callback

Reset X509 verify callback in the global
mbedtls context in case if the identity
callback isn't set.

Change-Id: Ib1abfa00753b971d4eda85cfc18ebcc3a7b0707d
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
6 months ago[IOT-3055]Fixed Handle collection resource payload 99/27299/14
koushik.girijala [Mon, 22 Oct 2018 10:01:16 +0000 (15:31 +0530)]
[IOT-3055]Fixed Handle collection resource payload

Fixed Handle collection resource payload for all interfaces
And also fixed batch interface for normal respources

Change-Id: I35c11597f2f55d1e3d40317209fe127cdd076d46
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
6 months agowebos: Avoid unused parameter warning 83/26983/4
Yi-Soo An [Thu, 20 Sep 2018 03:29:36 +0000 (12:29 +0900)]
webos: Avoid unused parameter warning

To avoid unused parameter warning at compile-time,
cast the parameter to void type.

Change-Id: I4559b6ad06dc6ccfd304561015d9a184108dea11
Signed-off-by: Yi-Soo An <yisooan@gmail.com>
6 months ago[IOT-1947][IOT-2761][IOT-3228] Rm PEM/DER convert 83/22983/19
Oleksii Beketov [Mon, 5 Nov 2018 13:21:23 +0000 (15:21 +0200)]
[IOT-1947][IOT-2761][IOT-3228] Rm PEM/DER convert

PEM/DER casting removed, allowing  mbedtls to manage
certificate conversion by itself. Credresource loads
certificates that could be either PEM or DER encoded
to a linked list instead of pushing them to a buffer.

Change-Id: I200f9ef8798b20bf894b8ef2cf85e42e13749f38
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
6 months ago[IOT-3219] Prevent Iotivity crash at OTM 19/27319/3
Aleksey Volkov [Wed, 24 Oct 2018 12:10:12 +0000 (15:10 +0300)]
[IOT-3219] Prevent Iotivity crash at OTM

Change-Id: Ia3436b8ea9da299084b770c4cd048f626a5d7d5a
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
6 months ago[IOT-3219][IOT-3220] Restore default handlers 35/27335/2
Aleksey Volkov [Mon, 29 Oct 2018 14:48:59 +0000 (16:48 +0200)]
[IOT-3219][IOT-3220] Restore default handlers

Restore default TLS handlers immediatelly after PSK generation
in case of MFG OTM

Change-Id: Idfce0bf8e2b6741d0a64a8f0143e2eb955e7167e
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
6 months ago[IOT-3220] Restore callbacks at reset 03/27303/2
Aleksey Volkov [Mon, 22 Oct 2018 13:35:49 +0000 (16:35 +0300)]
[IOT-3220] Restore callbacks at reset

- Restore pkix, psk, identity callbacks at internal reset
- Revert [IOT-3140] related changes, since all callbacks now
  restored in SRMInitSecureResources for both reset cases

Change-Id: Ibc859c8ee26ae9f914859e27d5ea2b2491f03bf6
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
6 months ago[IOT-3216] Fix /SP resource section write to PS 79/27379/2
Aleksey Volkov [Fri, 2 Nov 2018 14:32:44 +0000 (16:32 +0200)]
[IOT-3216] Fix /SP resource section write to PS

Fixed `copy-paste` typo due to which SP resource write was skipped ..

Change-Id: I1756a41f93a82b57a02d1c0641995fcf36fe5fa3
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
6 months ago[IOT-3224] Remove RO params from the request 51/27351/4
Aleksey Volkov [Wed, 31 Oct 2018 13:58:36 +0000 (15:58 +0200)]
[IOT-3224] Remove RO params from the request

cm, isop fields removed from POST request
to the /pstat resource at OTM time

Change-Id: Ife3771fb5676a495df96e21d08d8bf20aa9364f5
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
6 months agocloud: Update dependency 51/27251/3
Philippe Coval [Tue, 16 Oct 2018 21:36:52 +0000 (23:36 +0200)]
cloud: Update dependency

Fix vulnerabilities

Change-Id: I3f772edb78369d7583b86c060d59cb787ec905b0
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/27251
Signed-off-by: Philippe Coval <p.coval@samsung.com>
6 months agoIOT-3227 update unit test for rd,ci,as services 49/27349/1
Peter Rafaj [Wed, 31 Oct 2018 13:18:29 +0000 (14:18 +0100)]
IOT-3227 update unit test for rd,ci,as services

Change-Id: Ibc8afa347c5291b4560c98c14196c97a9bccc30d
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
6 months agoFix for connecting to TCP IPv6 socket 97/27297/6
koushik.girijala [Mon, 22 Oct 2018 07:57:16 +0000 (13:27 +0530)]
Fix for connecting to TCP IPv6 socket

Change-Id: I87700d134585a6088e21e5f33d5049ffd62f4fa8
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
6 months ago[IOT-3006] add WES and CNC Resources to DCRs 59/27259/4
Nathan Heldt-Sheller [Wed, 17 Oct 2018 12:05:19 +0000 (05:05 -0700)]
[IOT-3006] add WES and CNC Resources to DCRs

The WES and CNC Resources should be in the list of
Device Configuration Resources.

Change-Id: I889f68cf87ee0b074ff341262a0de037af8a15fa
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 months agoadd optional cert extensions 85/27285/7
Steven Saunders [Tue, 2 Oct 2018 17:52:33 +0000 (11:52 -0600)]
add optional cert extensions

Change-Id: I11ee97610c01f464dba896e600c71831629650bc
Signed-off-by: Steven Saunders <s.saunders-contractor@cablelabs.com>
6 months agoSeparate non-core tizen builds for Jenkins 93/27293/1
Mats Wichmann [Sun, 21 Oct 2018 15:06:09 +0000 (09:06 -0600)]
Separate non-core tizen builds for Jenkins

The continuous integration system for IoTivity builds the targets
tizen_secured and tizen_unsecured as defined in auto_build.py.  These two
not only do a full build of tizen, but also several extra builds of
samples as defined in the build_tizen function.  This change separates the
extra builds into separate targets so a developer can still easily
call them, but they will not be part of the required CI build on
every change submitted to gerrit.

Change-Id: I1c8846e74afb2eb18532baa64543e320ef045ba9
Signed-off-by: Mats Wichmann <mats@linux.com>
7 months ago[IOT-3203] keyUsage digitalSignature bit 61/27261/1
Nathan Heldt-Sheller [Wed, 17 Oct 2018 12:26:49 +0000 (05:26 -0700)]
[IOT-3203] keyUsage digitalSignature bit

Per CR 2611, CA and SubCA Certificates may (or may not) include
the keyUsage "digitalSignature" bit.  This change removes that
bit from the list of disallowed bits.

Change-Id: Ib70b838518bf2375be7b4ade9b5ab9d98cb397e9
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 months agoIOT-3215 Update RD PRESENCE_TABLE 43/27243/1
Peter Rafaj [Tue, 18 Sep 2018 13:13:24 +0000 (15:13 +0200)]
IOT-3215 Update RD PRESENCE_TABLE

Change-Id: I30577905978c91cbb2e2f223f0ea1cbb1ce12a0e
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoIOT-3214 rd mongo query optimalisation - reverify 37/27237/2
Peter Rafaj [Fri, 7 Sep 2018 12:06:33 +0000 (14:06 +0200)]
IOT-3214 rd mongo query optimalisation - reverify

Change-Id: I5f30ae3625463bf3bc6760c80447b481e6f1d4e2
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoIOT-3213 Handle reset code properly 35/27235/1
Ondrej [Wed, 5 Sep 2018 08:39:53 +0000 (10:39 +0200)]
IOT-3213 Handle reset code properly

Change-Id: I728588ab5852da4cefa7a8a5b565875522d6ccc4
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoIOT-3211 healthcheck for components 31/27231/1
Ondrej [Mon, 3 Sep 2018 11:31:24 +0000 (13:31 +0200)]
IOT-3211 healthcheck for components

Change-Id: I07a0f2e0d68d77a2cb0603ccc708d8e2b59a373c
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoIOT-3210 fix exception in keep alive 29/27229/1
Ondrej [Wed, 5 Sep 2018 08:34:53 +0000 (10:34 +0200)]
IOT-3210 fix exception in keep alive
periodic task

Change-Id: I4a2799fbfb7bdf7d741fef0aaaaea20ce0552377
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoIOT-3210 filter inactive channel 27/27227/1
Rap [Fri, 13 Jul 2018 13:34:50 +0000 (15:34 +0200)]
IOT-3210 filter inactive channel

Change-Id: Ib251b691164b41e614a527d8857362268a9639ab
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoProper fix for "Static Analysis issues fixed" 03/27203/1
Vitalii Irkha [Thu, 11 Oct 2018 10:05:20 +0000 (13:05 +0300)]
Proper fix for "Static Analysis issues fixed"

Fixed typo passed parameter of GetDoxmDeviceID in PostOwnershipInformation
Fixed double free issues

Change-Id: I07669049e4ff47176332d69660c4c2de6bb00732
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
7 months agoStatic Analysis issues fixed 25/27125/6
Vitalii Irkha [Thu, 4 Oct 2018 15:23:20 +0000 (18:23 +0300)]
Static Analysis issues fixed

Change-Id: I556003eb0babcb08698466bc9acde2790c1d7916
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
7 months agoIOT-3164 29/27129/1
Rap [Tue, 10 Jul 2018 07:17:21 +0000 (09:17 +0200)]
IOT-3164

Change-Id: Iaa850c1f8ad7eb824bdd62ed623b0717c797d60f
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoiotivity docker build via maven 03/27103/1
Rap [Mon, 21 May 2018 10:02:50 +0000 (12:02 +0200)]
iotivity docker build via maven

Change-Id: I1a4884d673da29db40042524d49e390ebfc97f00
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agochande from SP names to OIDS 49/27049/2
Steven Saunders [Fri, 21 Sep 2018 21:55:44 +0000 (15:55 -0600)]
chande from SP names to OIDS

Change-Id: Idbd71399d008e8a21819b400b1f664977ca5db0f
Signed-off-by: Steven Saunders <s.saunders-contractor@cablelabs.com>
7 months agoFixed some typo issues 79/27079/2
Vitalii Irkha [Thu, 27 Sep 2018 15:18:13 +0000 (18:18 +0300)]
Fixed some typo issues

Corrected Error Log statements in provisioningclient

Change-Id: Ife42b22236f90a25161e0ccb276fa3d1ee2871f2
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
7 months agoexamples/OCFSecure: Add ARTIK board 77/27077/2
Inho Oh [Mon, 13 Aug 2018 09:52:21 +0000 (18:52 +0900)]
examples/OCFSecure: Add ARTIK board

This patch add the ARTIK board to the list of supported devices.
The blue LED on board (GPIO38) is used for switch resource in the server
program. And the GPIO is controlled by "mraa" library which already used
in the server program.

The "mraa" library is not support the ARTIK board. So to use the raw GPIO
pin number, "raw=true" option is added.

Change-Id: I2004bc473c64189f3cc1010ae76c4cfe757b33f5
Signed-off-by: Inho Oh <webispy@gmail.com>
(cherry picked from commit 912a3a47cae8575030d298a3e67e7fd8472e5636)

7 months agoSample application maintenance for OCFSecure 81/26981/2
Rami Alshafi [Wed, 8 Aug 2018 00:46:11 +0000 (17:46 -0700)]
Sample application maintenance for OCFSecure

The DOXM resource in the RFOTM state needs to provide
write permissions to the onboarding tool.
Fixed code indentation formats and improved README

Change-Id: I8909f4b5182488bc01e69b2889cdf3ddeb8f42ab
Signed-off-by: Rami Alshafi <ralshafi@vprime.com>
(cherry picked from commit d23d1287715feb3297691d4f3340966eb5f0f9ef)

7 months agoMerge "Merge branch '1.4-rel' (758fc4a)" nhs-test
Mats Wichmann [Tue, 25 Sep 2018 13:47:10 +0000 (13:47 +0000)]
Merge "Merge branch '1.4-rel' (758fc4a)"

7 months agoobserve state of full presence table 59/27059/1
Rap [Fri, 27 Apr 2018 12:06:33 +0000 (14:06 +0200)]
observe state of full presence table

Change-Id: I17386998c025115f015a1b92e4e27f19bdf65f8c
Signed-off-by: Peter Rafaj <peter.rafaj@kistler.com>
7 months agoAdd doxygen comments for simulator 93/26593/9
pooja [Wed, 25 Jul 2018 13:29:14 +0000 (18:59 +0530)]
Add doxygen comments for simulator

Change-Id: Icd198cf5bd0ddae84bd6fa29757e6302cded9227
Signed-off-by: pooja <pooja.k@partner.samsung.com>
7 months agoAdd doxygen comments for notification 87/26587/11
pooja [Wed, 25 Jul 2018 11:17:53 +0000 (16:47 +0530)]
Add doxygen comments for notification

Change-Id: I0b1ef304a494687e1b53fee0be82b4af56d7326b
Signed-off-by: pooja <pooja.k@partner.samsung.com>
7 months agoMerge branch '1.4-rel' (758fc4a) 03/27003/2
Philippe Coval [Fri, 21 Sep 2018 10:28:50 +0000 (12:28 +0200)]
Merge branch '1.4-rel' (758fc4a)

Relate-to:
      I47ae68cbd633f0e8ffb38cde3e1b984e1c8505f5
      Ib4e768c7401247dc9dd4917ff5a611396e8e07a1
      I27bab5b348a4b0c52319447ce52e9ebdf3755628
      Ife04ffe93cd1780b448aa43072d7eba869a672fb
      I9bed4ade3fb12747e35d390b4a4e0339288ff564
      I29a2bafd1d163c4754cc3edcb77c15661399cbeb
      Ib48c441f4e07acbb4d9f74ba070ae427956e4178
      Id680843a04f69090b4ae7554e18d442f093debc7
      I5d43bc1e950811bbabceb1f42fd8cdcae31f87d0

Change-Id: Iaed67e1f8365f4d4cafea3a7cf149a73a7c601a4
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 months ago[IOT-3140] Revert PSK callback at reset 25/27025/2
Aleksey Volkov [Thu, 20 Sep 2018 15:14:09 +0000 (18:14 +0300)]
[IOT-3140] Revert PSK callback at reset

Set default PSK callback after the reset of
secure resources

Change-Id: Ib4e768c7401247dc9dd4917ff5a611396e8e07a1
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
7 months ago[IOT-3140] Revert PSK callback at reset 23/27023/2 1.4-rel
Aleksey Volkov [Thu, 20 Sep 2018 15:14:09 +0000 (18:14 +0300)]
[IOT-3140] Revert PSK callback at reset

Set default PSK callback after the reset of
secure resources

Change-Id: Ib4e768c7401247dc9dd4917ff5a611396e8e07a1
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
7 months ago[IOT-3140] Fix roles deinit crash 19/27019/1
Aleksey Volkov [Thu, 20 Sep 2018 11:51:24 +0000 (14:51 +0300)]
[IOT-3140] Fix roles deinit crash

Change-Id: I27bab5b348a4b0c52319447ce52e9ebdf3755628
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
7 months ago[IOT-3107] Proper SP resource reset 17/27017/1
Aleksey Volkov [Wed, 12 Sep 2018 09:40:47 +0000 (12:40 +0300)]
[IOT-3107] Proper SP resource reset

Reset SP secure resource to mfr defaults:
Add SP resource support to the reset profile in PS
API implementation.

Change-Id: Id680843a04f69090b4ae7554e18d442f093debc7
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
7 months ago[IOT-3140] Enable ResetSecureResources 15/27015/1
Aleksey Volkov [Mon, 10 Sep 2018 14:16:39 +0000 (17:16 +0300)]
[IOT-3140] Enable ResetSecureResources

Uncomment ResetSecureResources call on transition reset state.
This will return the proper state of the security resources
after reset.

Change-Id: I5d43bc1e950811bbabceb1f42fd8cdcae31f87d0
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>