iotivity.git
11 months ago[IOT-3140] Fix roles deinit crash 13/27013/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>
11 months agoRD samples need to call OCProcess. 91/26991/2
Todd Malsbary [Mon, 27 Nov 2017 19:30:56 +0000 (11:30 -0800)]
RD samples need to call OCProcess.

Bug: https://jira.iotivity.org/browse/IOT-2846
Change-Id: Ife04ffe93cd1780b448aa43072d7eba869a672fb
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
11 months agobuild: Disable MOT by default to align spec 87/24887/3
Philippe Coval [Mon, 17 Jul 2017 17:17:11 +0000 (19:17 +0200)]
build: Disable MOT by default to align spec

An extra build job might be requiered to turn on all features

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: I9bed4ade3fb12747e35d390b4a4e0339288ff564
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/21493/
(cherry picked from commit 49d3f8b51d81705933006c968bc32da30ac1c387)

11 months ago[IOT-3055] Fix to handle single element of batch 07/26007/12
koushik.girijala [Wed, 27 Jun 2018 09:52:27 +0000 (15:22 +0530)]
[IOT-3055] Fix to handle single element of batch

Response for collection with batch interface should be an array and not
object, This change will fix the case when the collection resource have
to send only one element in response, instead of sending it as array of
one element it sends as single object
As per OCF 2.0 spec , for single element case the response should be an
array even for single element

Change-Id: I29a2bafd1d163c4754cc3edcb77c15661399cbeb
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
11 months agobridging: build: Remove duplicated -Werror 71/26971/2
Philippe Coval [Fri, 14 Sep 2018 15:32:31 +0000 (17:32 +0200)]
bridging: build: Remove duplicated -Werror

Should rely only only ./build_common/

More cleanup to come later

Change-Id: Ib48c441f4e07acbb4d9f74ba070ae427956e4178
Signed-off-by: Philippe Coval <p.coval@samsung.com>
11 months ago[IOT-3107] Proper SP resource reset 53/26953/2
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>
11 months ago[IOT-3140] Enable ResetSecureResources 35/26935/2
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>
11 months agobuild: Remove duplicated -Werror 13/26813/5
Philippe Coval [Wed, 22 Aug 2018 07:32:49 +0000 (09:32 +0200)]
build: Remove duplicated -Werror

Should rely only only ./build_common/

More cleanup to come later

Change-Id: I3de75a1485c47fd54ea46da2f3079a6e5fae8084
Origin: https://gerrit.iotivity.org/gerrit/#/c/26833/
Signed-off-by: Philippe Coval <p.coval@samsung.com>
(cherry picked from commit e26d8059b6c3eff4e6001cf6f9fa9355feefe1e0)

11 months agoIotivity hangup 53/26853/4
Jozef Kralik [Thu, 30 Aug 2018 07:30:47 +0000 (09:30 +0200)]
Iotivity hangup

- fix for mutex deadlock in case of simualetionesly send & recieve of tcp/tls connections

Bug: https://jira.iotivity.org/browse/IOT-3075
Bug: https://jira.iotivity.org/browse/IOT-3059
Change-Id: I6e9296de9b22858f831ee503587fda51323ac902
Signed-off-by: Jozef Kralik <jozef.kralik@kistler.com>
11 months agoadd a function to swap elements in a u_arraylist 51/26851/2
Jozef Kralik [Thu, 30 Aug 2018 07:27:40 +0000 (09:27 +0200)]
add a function to swap elements in a u_arraylist

- u_arraylist_swap provides swap of elements in a array list

Bug: https://jira.iotivity.org/browse/IOT-3075
Bug: https://jira.iotivity.org/browse/IOT-3059
Change-Id: Iead0efa96b95f026b6a5b20731c8069f688c9483
Signed-off-by: Jozef Kralik <jozef.kralik@kistler.com>
11 months agointroduce a refcounter for data 49/26849/2
Jozef Kralik [Thu, 30 Aug 2018 07:23:57 +0000 (09:23 +0200)]
introduce a refcounter for data

- provides interface and implementation of reference counter
- for example of using look to:
  resource/c_common/oc_refcounter/test/linux/oc_refcounter_tests.cpp

Bug: https://jira.iotivity.org/browse/IOT-3075
Bug: https://jira.iotivity.org/browse/IOT-3059
Change-Id: Ib4f04677cdc6951a0a9505efbd6ab47a7a79288b
Signed-off-by: Jozef Kralik <jozef.kralik@kistler.com>
12 months agoresource-encapsulation: Install unit tests 43/26543/3
Philippe Coval [Fri, 23 Mar 2018 10:46:15 +0000 (11:46 +0100)]
resource-encapsulation: Install unit tests

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ic88f9bae3137c439518901084d77285ace964d99
Origin: https://gerrit.iotivity.org/gerrit/#/c/26515/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
12 months agoAdd unused markers if MULTIPLE_OWNER is undefined 75/24875/2
Mats Wichmann [Mon, 23 Apr 2018 16:18:47 +0000 (10:18 -0600)]
Add unused markers if MULTIPLE_OWNER is undefined

Several functions in one source file have code which is bracketed
by #ifdef MULTIPLE_OWNER. If not defined, these trigger warnings
about unused parameters; since warnings now cause error, this is
fatal. Add OC_UNUSED() wrappings for these.

Change-Id: I6b6320e8a6444a43c6400527f2f982a39a3d9128
Signed-off-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit d0c36f5b96caac409dcde289a0bb1b037fb54d03)

12 months agoUpdate /sp to latest CR text 87/26687/3
Nathan Heldt-Sheller [Fri, 3 Aug 2018 05:05:42 +0000 (22:05 -0700)]
Update /sp to latest CR text

The Security WG approved a new version of the CR (v14) that
reflects several changes in the /sp Resource.  From a Server
perspective the main impact is that the Property names were
changed, and support for all 4 defined Profiles is required
for CTT validation.

Change-Id: Ibaf2c7d0b9daad7248b2f226da164a7a301dc526
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
12 months agoplugins: Use common params for Werror flag 93/26493/2
Philippe Coval [Sun, 22 Jul 2018 06:58:24 +0000 (08:58 +0200)]
plugins: Use common params for Werror flag

This flag should be used at project level using build_common settings

For reference the build issue was oberved on Yocto's poky master:

    bridging/plugins/lifx_plugin/lifx_objects/lifx.cpp:83:53:\
    required from here
    extlibs/rapidjson/rapidjson/include/rapidjson/document.h:1635:24: \
    error: 'void* memcpy(void*, const void*, size_t)' \
    writing to an object of type \
    'class rapidjson::GenericValue<rapidjson::UTF8<> >' \
    with no trivial copy-assignment; \
    use copy-assignment or copy-initialization instead \
    [-Werror=class-memaccess]
    std::memcpy(data_.a.elements, values, count * sizeof(GenericValue));
    (...)

Change-Id: I4b820e50158e34a94d84195e4979ada6fefff190
Signed-off-by: Philippe Coval <p.coval@samsung.com>
12 months agonotification: Install unit tests 45/26545/4
Philippe Coval [Fri, 23 Mar 2018 10:45:56 +0000 (11:45 +0100)]
notification: Install unit tests

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/26509/
Change-Id: I91c44d9e3e8af731175337bc80afa13a44222d6c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
12 months agotizen: Enable MULTIPLE_OWNER=1 for EasySetup 85/24885/6
Philippe Coval [Wed, 17 May 2017 10:36:51 +0000 (12:36 +0200)]
tizen: Enable MULTIPLE_OWNER=1 for EasySetup

Bug: https://jira.iotivity.org/browse/IOT-2241
Origin: https://gerrit.iotivity.org/gerrit/#/c/20331/
Change-Id: I5c10141d76c1d2a1ce3efc656990a628dfd6a246
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
12 months ago[IOT-3096] Revert Fix for TCP IPv6 socket 53/26653/3
Koushik4082 [Tue, 31 Jul 2018 04:51:22 +0000 (10:21 +0530)]
[IOT-3096] Revert Fix for TCP IPv6 socket

Revert changes

Change-Id: I92948b4039e464cd2ee02dcdf236a57942bf1992
Signed-off-by: Koushik4082 <g.koushik@samsung.com>
12 months agotizen: Support armv7l EABI 15/26415/3
Philippe Coval [Thu, 14 Jun 2018 11:49:27 +0000 (13:49 +0200)]
tizen: Support armv7l EABI

Bug: https://jira.iotivity.org/browse/IOT-2994
Change-Id: I8be9e04196558f81a584bd440b4cdb4aaa01e130
Origin: https://gerrit.iotivity.org/gerrit/#/c/26077/
Signed-off-by: Philippe Coval <p.coval@samsung.com>
12 months agocoap-http-proxy: Relocate tests 49/26549/4
Philippe Coval [Sat, 24 Mar 2018 11:31:28 +0000 (12:31 +0100)]
coap-http-proxy: Relocate tests

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/26521/
Change-Id: I160789e7def32ef8022729c7479c16d7843a948f
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
12 months agoplugins: Relocate tests 41/26541/3
Philippe Coval [Sat, 24 Mar 2018 11:31:28 +0000 (12:31 +0100)]
plugins: Relocate tests

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/26523/
Change-Id: I49ddaf5b2dc1123ae79b37d9df3c7dd4d29cc820
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
12 months agoresource-encapsulation: Bypass test for gcc-7 47/26547/3
Philippe Coval [Sun, 22 Jul 2018 09:07:15 +0000 (11:07 +0200)]
resource-encapsulation: Bypass test for gcc-7

This should be reworked soon or later

Change-Id: I5ec710a552305e692a16d17f5bac5accc171c641
Origin: https://gerrit.iotivity.org/gerrit/#/c/26503/
Signed-off-by: Philippe Coval <p.coval@samsung.com>
12 months ago[IOT-3096] Fix for connecting to TCP IPv6 socket 95/26295/7
koushik.girijala [Tue, 10 Jul 2018 15:02:49 +0000 (20:32 +0530)]
[IOT-3096] Fix for connecting to TCP IPv6 socket

Change-Id: I90f971ec1f51d7a2b7dd829c3ebd6fbd61f90c77
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
12 months agombedtls: remove .git after prepared for tizen 85/26385/2
Philippe Coval [Thu, 14 Jun 2018 07:21:37 +0000 (09:21 +0200)]
mbedtls: remove .git after prepared for tizen

Change-Id: Ifff1cb0c043d3ea089bfef5e1568c57edfa86c89
Origin: https://gerrit.iotivity.org/gerrit/#/c/25835/
Signed-off-by: Philippe Coval <p.coval@samsung.com>
(cherry picked from commit 5ae3ade733f273da06c86b0260d67dadec06703f)

12 months ago[IOT-3023] Easy Setup Missing Library for x86 73/26573/3
Larry Sachs [Tue, 24 Jul 2018 20:44:38 +0000 (13:44 -0700)]
[IOT-3023] Easy Setup Missing Library for x86

The libeasysetup-jni.so and libESMediatorRich.so libraries
are now being placed in the correct directories for inclusion
into the apk file for x86 and x86_64 builds.

Change-Id: I7ed76995ace68ea16e13f083b32606a1b63a2cd6
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
12 months agodoc: Install chrpath 13/26413/2
Philippe Coval [Tue, 17 Jul 2018 22:58:20 +0000 (07:58 +0900)]
doc: Install chrpath

Bug: https://jira.iotivity.org/browse/IOT-3120
Change-Id: I0cf7091c124548504e44f614da69a5d61d702002
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
13 months agoAdd libocsrm to tizen build 27/26427/2
Mushfiqul Islam Antu [Wed, 18 Jul 2018 11:19:27 +0000 (17:19 +0600)]
Add libocsrm to tizen build

Added ocsrm library as target install library

Bug: https://jira.iotivity.org/browse/IOT-3076
Change-Id: I8e046da345b18e5731939c9cb5e5832fa33786b7
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
13 months agobuild: Remove RPATH on install using chrpath 43/26043/4 1.4.0-RC3 2.0.0 2.0.0-RC1
Philippe Coval [Fri, 24 Nov 2017 22:08:00 +0000 (23:08 +0100)]
build: Remove RPATH on install using chrpath

Note to system admin please install the package on infrastructure

This is useful for ARTIK7 support on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I8e046da345b18e5731939c9cb5e5832fa33786b6
Origin: https://gerrit.iotivity.org/gerrit/#/c/23449/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit dd22384162f1f744e33f144e1903638243f3dffa)

13 months agotinycbor: Remove .git after prepared for tizen 35/26235/2
Philippe Coval [Thu, 14 Jun 2018 00:39:04 +0000 (02:39 +0200)]
tinycbor: Remove .git after prepared for tizen

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I2d7c4cba8408c97f2c8eb959fb3c69473e9f117a
Origin: https://gerrit.iotivity.org/gerrit/#/c/26075/
Signed-off-by: Philippe Coval <p.coval@samsung.com>
(cherry picked from commit 17d3a5661a87c35af73bb0c979bad43ffa587ddd)

13 months ago[IOT-3108] Disabled identity check for MFG OTM 87/26087/2
Oleksandr Andrieiev [Mon, 2 Jul 2018 11:01:48 +0000 (14:01 +0300)]
[IOT-3108] Disabled identity check for MFG OTM

Bug: https://jira.iotivity.org/browse/IOT-3108
Change-Id: I1bca35ab9c516f7a0850dd209e043048d9194007
Signed-off-by: Oleksandr Andrieiev <o.andrieiev@samsung.com>
13 months agobuild: Update version to 2.0.0 81/26081/4
Philippe Coval [Mon, 2 Jul 2018 07:51:28 +0000 (09:51 +0200)]
build: Update version to 2.0.0

I wasnt aware about the 2.0-rel but I saw it was changed elsewher
and decided it should be consistent:

May be squashed in:

https://gerrit.iotivity.org/gerrit/#/c/26031/2/resource/csdk/include/octypes.h

5165b2baeb4b667aa0a9768f5f0ae9bd3bfb2a9f

Bug: https://jira.iotivity.org/browse/IOT-1745
Origin: https://gerrit.iotivity.org/gerrit/#/c/26081/
Change-Id: I2e1afd6201f2047226ff5dc7911f736a240920f3
Signed-off-by: Philippe Coval <p.coval@samsung.com>
13 months agoignore: generated files from debian 79/25879/4
Philippe Coval [Wed, 18 Apr 2018 16:49:01 +0000 (18:49 +0200)]
ignore: generated files from debian

Change-Id: Ifc7d3179993ad3a10cf866f0ae648c7cd4fd00c7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 7e749393f68f56cf7fb23d46f086a9728d3dd8f9)

13 months agoFix and clean up libcoap build 15/26215/2
Mats Wichmann [Fri, 6 Jul 2018 13:27:51 +0000 (07:27 -0600)]
Fix and clean up libcoap build

Most signficant change: when upstream libcoap is used (always true for
Windows), do "git checkout" even if the desired tag is already in the
repo, this should fix the case where the checkout is not up to date but
the repo is, so no checkout is done.

Minor changes:

* The forked-coap case is moved to the top of if clauses for readability
  (before there might have been dozens of lines, then else: followed by
  two lines)
* A bug where PREFIX rather than LIBPREFIX was fetched from the
  construction environment is fixed.
* One of the config file names was simplified a bit.
* The Glob call to determine source files to build is now wrapped in a
  try block, the current Tizen SCons is so old it does not support the
  "exclude" attribute.
* A check for the Tizen case ("don't use git commands in sconscript")
  is added.
* Comment updates

Change-Id: Icec0d1a9c5cbf20f0adbc32745486333766234e7
Signed-off-by: Mats Wichmann <mats@linux.com>
13 months ago[IOT-3098] create Resource as OC_SECURE by default 87/26187/3
Nathan Heldt-Sheller [Thu, 5 Jul 2018 23:14:30 +0000 (16:14 -0700)]
[IOT-3098] create Resource as OC_SECURE by default

The current behavior of OCCreateResource() is to create an unsecure
Resource by default.  However it should be flipped, so that creating
an unsecure Resource requires explicit intention.  This may fix
IOT-3098, where several Resources are unsecure that should not be.

Change-Id: I35083f5e240ecbc6d1c731642b5c8124c5283712
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
13 months ago[IOT-3106] Memory leak when converting PEM to DER 97/25997/6
Oleksandr Andrieiev [Tue, 26 Jun 2018 12:25:44 +0000 (15:25 +0300)]
[IOT-3106] Memory leak when converting PEM to DER

Bug: https://jira.iotivity.org/browse/IOT-3106
Change-Id: I560830d62bad76447bf1c4acaf004cc779fbcdfb
Signed-off-by: Oleksandr Andrieiev <o.andrieiev@samsung.com>
13 months agoUpdate IoTivity version in octypes.h 31/26031/2
Nathan Heldt-Sheller [Thu, 28 Jun 2018 16:54:57 +0000 (09:54 -0700)]
Update IoTivity version in octypes.h

At OSWG meeting we agreed to change version 1.4 to 2.0.  I won't
rename the branch but I'm going to change the final tag name to
2.0.0 instead of 1.4.0, and I'm going to change the version
reported by IoTivity itself (this patch).

Change-Id: If23e5c258e61298e6b10996402b0961b2ebcd672
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
13 months ago[IOT-3044]Adding token to empty signaling message 91/25491/8
koushik.girijala [Mon, 14 May 2018 10:12:03 +0000 (15:42 +0530)]
[IOT-3044]Adding token to empty signaling message

Support for adding token to empty signaling message
Draft changes in coap and IoTivity

Change-Id: I7be3da0c09b41516d57c02cef98a6815dd1950bb
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
13 months ago[IOT-3094] Cloud deregister does not work properly 97/25897/5
Vitalii Irkha [Thu, 21 Jun 2018 10:58:29 +0000 (13:58 +0300)]
[IOT-3094] Cloud deregister does not work properly

Refactoring SignOut Cloud API

Change-Id: If26baa6a2e994184cc829919fb1a5f0303d78f31
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
13 months agoUpdate upstream-libcoap to IoTivity-1.4 tag 25/25925/2
Mats Wichmann [Sun, 24 Jun 2018 14:09:20 +0000 (08:09 -0600)]
Update upstream-libcoap to IoTivity-1.4 tag

New coap code is needed so update the tag to look for. Fixes the
failed Windows CI builds in https://gerrit.iotivity.org/gerrit/#/c/25491/

Other changes:
* The SConscript adds the WITH_WS definition to the build
* Quiet the windows warning on size mismatches (W4267)
- Note these two indicate problems introduced by iotivity patches to
the dthaler libcoap fork, and the problems themselves should be fixed
(WITH_WS is correct, but the logic in the case statement is not, so the
absence of the flag caused build failures which are now covered up -
this one is IOT-3103)

* libcoap script checked tag in last line of commit log, that's fragile,
so changed to use git log instead.

* The standard check for the alternate way the code may be populated
is added.  This is used for Tizen builds.

* A little restructuring for readability (message strings defined away
from the code so we can read the code), and the "git checkout" is now
actually error-checked.

Bug: https://jira.iotivity.org/browse/IOT-3044
Change-Id: I331ef9ed19d128ff975d150f6c0058eff64b59ff
Signed-off-by: Mats Wichmann <mats@linux.com>
14 months ago[IOT-3097] change sct from 1 back to 9 93/25893/2
Nathan Heldt-Sheller [Wed, 20 Jun 2018 16:22:01 +0000 (09:22 -0700)]
[IOT-3097] change sct from 1 back to 9

Since CTT Devs are using oic_svr_db_server_justworks.json/.dat for testing,
and they depend on sct 9, it doesn't hurt to use sct 9 (even though this
particular example is to demonstrate justworks).  Changing to prevent CTT
Devs from having to workaround.

Change-Id: I547f9936d09d4fcfb0a6d84b075bd30252852d6e
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
14 months ago[IOT-3075] Aborting TCP connect operation 89/25489/3
koushik.girijala [Fri, 25 May 2018 10:12:34 +0000 (15:42 +0530)]
[IOT-3075] Aborting TCP connect operation

Aborting TCP connect operation during IP disconnect and Adapter stop

Change-Id: If6a51416f90be533ebdd70096781c3d094512752
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
14 months ago[IOT-3090] disable /sp Resource 37/25837/2 1.4.0-RC2
Nathan Heldt-Sheller [Sun, 17 Jun 2018 02:27:37 +0000 (19:27 -0700)]
[IOT-3090] disable /sp Resource

/sp Resource must be temporarily disabled until CTT is updated to recognize
it (~Bangkok point release) else it causes CTT failures.

Change-Id: Id52c8acaf5a76e727bedf28288c08472255a988a
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
14 months ago[IOT-3083] IUT crash while batch update by href 05/25805/2
Biman Paul [Fri, 8 Jun 2018 10:25:03 +0000 (15:55 +0530)]
[IOT-3083] IUT crash while batch update by href

IUT crash occured while executing CTT Server Testcase 1.2.13
Batch update by href. Double free occured for server request
handle. Once in HandleSingleResponse() and another in
HandleAggregateResponse().
6  0x00007ffff705f452 in OICFree (ptr=0x7fffd400d6f0)
    at resource/c_common/oic_malloc/src/oic_malloc.c:150
7  0x00007ffff729da8e in DeleteServerRequest (serverRequest=0x7fffd40008c0)
    at resource/csdk/stack/src/ocserverrequest.c:412
8  0x00007ffff729eaf1 in HandleAggregateResponse (ehResponse=0x7fffe8dcc450)
    at resource/csdk/stack/src/ocserverrequest.c:892

Change-Id: I69ca3d5a0fe59626b545047530b68fd0cfdd27ad
Signed-off-by: Biman Paul <biman.paul@samsung.com>
14 months ago[CR2390] Identity spoofing/privelege escalation 71/25771/6
Oleksandr Andrieiev [Fri, 8 Jun 2018 13:54:23 +0000 (16:54 +0300)]
[CR2390] Identity spoofing/privelege escalation

For secure connections that use certificates the SubjectUUID
is retrieved from leaf certificate's CN. However, there is
no binding mechanism between Root CA and Device Id that it
can generate certificates for. Root CAs can issue certificates
with arbitrary UUIDs, which can be used to impersonate another
Device.

The fix adds callback to the certificate chain validation
function. This callback collects single-linked list of all
UUIDs associated with the certificate in cred entries.
When leaf certificate is reached, UUID of Device is retrieved
and matched against static list. If no matching UUID is
found, connection should be rejected.

Bug: https://jira.iotivity.org/browse/IOT-3087
Change-Id: I20333c980226dc6a0c257dc36aab1502202993d9
Signed-off-by: Oleksandr Andrieiev <o.andrieiev@samsung.com>
14 months ago[IOT-3022] Build CNC as standalone lib 95/25395/9
Vitalii Irkha [Wed, 23 May 2018 08:24:59 +0000 (11:24 +0300)]
[IOT-3022] Build CNC as standalone lib

SConscript for cloud build
Cloud Reset is also was added

Change-Id: Ibd33bf931322a58e3efac1ccfebd5ea5cb6a1330
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
14 months ago[IOT-3022] Fix ResetClouds() api 85/25685/3
Vitalii Irkha [Wed, 6 Jun 2018 16:43:51 +0000 (19:43 +0300)]
[IOT-3022] Fix ResetClouds() api

Fixed minor issues

Change-Id: I95ea9ae239336c7b602d55569d2c2f9b5b2976d3
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
14 months agoGenerate introspection data for coaps+tcp endpoint 11/25411/2
George Nash [Wed, 23 May 2018 18:16:11 +0000 (11:16 -0700)]
Generate introspection data for coaps+tcp endpoint

Bug: https://jira.iotivity.org/browse/IOT-3056

Change-Id: I85e0b6a1585eac4d0f90154c261103ce58343fd7
Signed-off-by: George Nash <george.nash@intel.com>
14 months ago[IOT-3022] Add cloud reset api 15/25315/4
Aleksey Volkov [Fri, 11 May 2018 10:01:07 +0000 (13:01 +0300)]
[IOT-3022] Add cloud reset api

Change-Id: I40a9b3c3f89894e92c75c798e918f1713e9e6740
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
14 months ago[IOT-3022] Session delete fix 07/25407/2
Aleksey Volkov [Wed, 23 May 2018 14:04:41 +0000 (17:04 +0300)]
[IOT-3022] Session delete fix

Do not delete session in case if token refresh thread stops

Change-Id: I44bd904f13cdd7b44e34e47a69ce403248e550b9
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
14 months agoAdd csdk API to send COAP ping messages over TCP 05/25305/3
Koushik Girijala [Mon, 26 Mar 2018 12:53:15 +0000 (18:23 +0530)]
Add csdk API to send COAP ping messages over TCP

Add csdk API in ocstack to send COAP ping messages
over tcp.

Change-Id: Idbe257c1baa90a7cabce6fe6113ab09fb5644eab
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: koushik girijala <g.koushik@samsung.com>
(cherry picked from commit bfbac92c38ba2ae9280ff8694e0862610423b43f)

14 months ago[IOT-3044] No response for Ping message 43/25443/1
Veeraj Khokale [Thu, 5 Apr 2018 09:35:54 +0000 (15:05 +0530)]
[IOT-3044] No response for Ping message

TCP adapter disconnects the session whenever
the data to be sent has an empty payload.
Since ping messages and signaling messages
need to have an empty payload they are dropped.
Fix this by checking if the message is a signaling
message before dropping it.

Change-Id: I1cfad27fcfd5cf3a42510412e6555b84ea905259
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
(cherry picked from commit c7dce6b522604e2c6b99847c88a00f7da275c08d)

15 months agoCloud resource fix 85/25385/1
koushik.girijala [Fri, 18 May 2018 05:16:34 +0000 (10:46 +0530)]
Cloud resource fix

fixed resource uri for issue [IOT- 3069]
removed unsecure enpoints from cloud payload [IOT-3071]
adding oic.if.rw interface to cloud resource [IOT-3070]

Change-Id: I719d54bd846f77a5cf2905ccc130ab0434005491
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
15 months agotizen: Only support IP transport by default 81/24881/2
Philippe Coval [Tue, 24 Apr 2018 13:57:57 +0000 (15:57 +0200)]
tizen: Only support IP transport by default

It looks like BLE support has been dropped,
while some bits are remaining, check for:
CA_BLE_NORMAL_SEGMENT_PAYLOAD_SIZE

Bug: https://jira.iotivity.org/browse/IOT-2030
Change-Id: Idb99ebfbd721c6abb5ce6cfcf2c381ece195ffc8
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
15 months ago[IOT-3022] Code style and fix minor issues. 49/25249/8
Vitalii Irkha [Tue, 15 May 2018 15:09:02 +0000 (18:09 +0300)]
[IOT-3022] Code style and fix minor issues.

Fixed some negligible issues.

Change-Id: If6ef5b77514a2b4cccea90e609da340c75083ac6
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
15 months ago[IOT-3047] Request to csr creates a new credential 31/24931/2
Vitalii Irkha [Thu, 26 Apr 2018 16:15:39 +0000 (19:15 +0300)]
[IOT-3047] Request to csr creates a new credential

Request to /oic/sec/csr creates itself a new credential
Get PrimarySertKey for appropriated Primary Certificate.

Change-Id: Ie09a186fb03c3cc0006a583fc6ea03c5aa739790
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
15 months ago[IOT-3022] CNC fixes for CTT 73/24873/14
Aleksey Volkov [Tue, 24 Apr 2018 13:03:13 +0000 (16:03 +0300)]
[IOT-3022] CNC fixes for CTT

- fixed clec
- disable multiple cloud support
- add more logging
- fix apn & redirectUri errors
- freeCloud fix
- cloud refresh fix

Change-Id: I7898e2c704320a84d441ffc4a3dae6de03eb8a7e
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
15 months ago[IOT-3022] cloud fix #2 95/24795/5
Aleksey Volkov [Tue, 24 Apr 2018 12:59:54 +0000 (15:59 +0300)]
[IOT-3022] cloud fix #2

a) sample server justwork: added key press check
b) fixed apn check
c) signout in delete cloudconfig
d) delete cloud
e) use redirect uri
f) update cloud if not working
g) token refresh timeout

Change-Id: Iefe5e0d0c37359a5699f021364a0aa82e8799f68
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
15 months agombedtls: Install Static libs 79/24879/3
Philippe Coval [Tue, 24 Apr 2018 09:16:30 +0000 (11:16 +0200)]
mbedtls: Install Static libs

Change-Id: Ia69fc0a9d7b0624a13c7d3ef2ba6a0e921ea4ba3
Bug: https://jira.iotivity.org/browse/IOT-3027
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit cca779a39cc587460d2793f58897a277f0e93e00)

15 months agotinycbor: Update to v0.5.1 61/24761/5
Philippe Coval [Wed, 18 Apr 2018 13:04:40 +0000 (15:04 +0200)]
tinycbor: Update to v0.5.1

Bug: https://jira.iotivity.org/browse/IOT-1600
Change-Id: I1f59d7d0dc13e00d041d6feb465a359cd7388282
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 5c16320f2fee0194a1285e35ffe189bb082d6732)

16 months agoMerge branch '1.3-rel' into 1.4-rel 13/24813/1
Philippe Coval [Fri, 20 Apr 2018 15:23:16 +0000 (17:23 +0200)]
Merge branch '1.3-rel' into 1.4-rel

Change-Id: I43209c55d6b5a6b7dc8ef8b1de8f49f2f8e7eb9a
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months ago[IOT-3022] Plugfest hotfix 4 75/24775/3
Aleksey Volkov [Tue, 17 Apr 2018 13:28:52 +0000 (16:28 +0300)]
[IOT-3022] Plugfest hotfix 4

-- return empty filled response from /oic/cloudconf in case if cloud data is not provisioned
-- add rt and if fields to the RETRIEVE response payload

Change-Id: I37adc9b039e1ab9377b8024552eee4fb1e3ed1ab
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
16 months agocloud fix #1 71/24771/1
Aleksey Volkov [Wed, 18 Apr 2018 13:30:26 +0000 (16:30 +0300)]
cloud fix #1

a) mandatory fixed
b) apn param usage in signup
c) clean

Change-Id: I615432439a68600f00d7335d3641c7d7499c8955
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
(cherry picked from commit 0532f6be172f805384e4c1b5fc549f183a45b3b5)

16 months agostatic analysis: buffer size violations 63/24163/7
Mats Wichmann [Thu, 15 Feb 2018 20:15:35 +0000 (13:15 -0700)]
static analysis: buffer size violations

fix reported "might leave destination string unterminated" when
using strncpy and the size argument is the size of the desitnation
buffer. There are several ways to fix, but the IoTivity API OCStrncpy
adjusts the size before calling the underlying fuction and so fixes
the problem. This is the coding standard recommendation anyway.

for instances in examples, oic_string.h is not in the public API,
so just fix up the counts.

bridging/common/messageHandler.cpp had a third strncpy which was not
flagged - but it was using a constant that did not match the size
in the destination - MPMResourceList.href is size MPM_MAX_URI_LEN,
so this was adjusted.

service/notification/src/consumer/NSConsumerCommon.c had this construct:
   sizeof(char) * NS_DEVICE_ID_LENGTH
in several places (one of which was one of these strncpy calls that
was changed). the instances were shortened NS_DEVICE_ID_LENGTH for
readability. This is not fixing any reported problem and can be
dropped if it bothers reviewers.

Change-Id: I8f22f7dd704849477dad0dd1f16cd9276ebf1d04
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months ago[IOT-3022] 37/24637/4
Oleksandr Dmytrenko [Thu, 12 Apr 2018 13:52:33 +0000 (16:52 +0300)]
[IOT-3022]

outdated cloud sample removed

Change-Id: I8d8991d1e6f5f0879c3a168b7807680710b2e0a2
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
16 months ago[IOT-3022] 27/24527/22
Oleksandr Dmytrenko [Fri, 30 Mar 2018 09:02:00 +0000 (12:02 +0300)]
[IOT-3022]

a) cloud resource unittests
b) amacl resource make cbor fix

Change-Id: Ib4d56f3105e060656d52f5b0b498ae188fe42c03
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
16 months agoEnhanced comment ratio for le_adapter 17/24617/6
Kush [Tue, 10 Apr 2018 09:47:53 +0000 (15:17 +0530)]
Enhanced comment ratio for le_adapter

Change-Id: I893246e60d959efa65741635e8e8b286e05a0b4d
Signed-off-by: Kush <kush.agrawal@samsung.com>
16 months ago[IOT-3022] Plugfest hotfix 3 23/24723/3
Aleksey Volkov [Tue, 17 Apr 2018 12:46:03 +0000 (15:46 +0300)]
[IOT-3022] Plugfest hotfix 3

- add coapcloudconf uri to DCR list
- start cloud signin on RFNOP, not on RFPRO

Change-Id: Id52b650a23c82830a2641d5e0e5b94af79aa0c27
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
16 months ago[IOT-2052] Update to support OCF 1.0 47/24647/3
v.riznyk [Fri, 13 Apr 2018 15:17:00 +0000 (18:17 +0300)]
[IOT-2052] Update to support OCF 1.0

missing fix for task, changed size of map

Change-Id: I8a6cf6fc06058c003da3ec52d695aa0dd303c63f
Signed-off-by: v.riznyk <v.riznyk@samsung.com>
16 months ago[IOT-3022] plugfest hotfix 91/24691/2
Aleksey Volkov [Mon, 16 Apr 2018 14:24:42 +0000 (17:24 +0300)]
[IOT-3022] plugfest hotfix

Change-Id: I9ffd0a80eef1343c28034dfb66edc7d55cb5e8de
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
16 months agoRE: Check MLK in resourceBroker unit-test 97/15397/44
Philippe Coval [Fri, 9 Dec 2016 23:09:48 +0000 (00:09 +0100)]
RE: Check MLK in resourceBroker unit-test

Bug: https://jira.iotivity.org/browse/IOT-2267
Change-Id: I0cc8d19fd693a2f10ac2230f0ca34a4ae4bc31ea
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months ago[IOT-3040] OCProvisionTrustCertChain CB not called 85/24585/3
Vitalii Irkha [Thu, 5 Apr 2018 12:29:26 +0000 (15:29 +0300)]
[IOT-3040] OCProvisionTrustCertChain CB not called

SRPGetSpResourceCB registers any client responce.

Change-Id: Ib24479bfd76c8c683998ac4c7187dfc90fb47041
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
16 months ago[Resource-Encapsulation] Improved doxygen comments 61/23761/5
Jay Sharma [Thu, 12 Apr 2018 13:19:32 +0000 (18:49 +0530)]
[Resource-Encapsulation] Improved doxygen comments

Change-Id: I367e12d25e27b904a18bf9c6bb14c87001c3e20b
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
16 months agoc_common: Fix warnings in octhread.c 29/24129/4
Philippe Coval [Mon, 13 Nov 2017 14:09:38 +0000 (15:09 +0100)]
c_common: Fix warnings in octhread.c

They were discovered when building for Tizen:RT

Bug: https://jira.iotivity.org/browse/IOT-2539
Origin: https://gerrit.iotivity.org/gerrit/#/c/24129/
Change-Id: Idea365f15f5aff38634e05914d9c55afe2d6bd8e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agobuild: Update version to 1.4.0 21/24421/4
Philippe Coval [Mon, 19 Mar 2018 08:28:29 +0000 (09:28 +0100)]
build: Update version to 1.4.0

Change-Id: I3e6ab42060cd082094dd906e36897dc58f152773
Origin: https://gerrit.iotivity.org/gerrit/#/c/24421/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months ago[IOT-3041] return OC_STACK_OK when pDev2=NULL 51/24551/2
v.riznyk [Tue, 3 Apr 2018 15:37:05 +0000 (18:37 +0300)]
[IOT-3041] return OC_STACK_OK when pDev2=NULL

The checking pDev2 was added to OCProvisionCredentials.

Change-Id: Ic289559c68250a1436fab64bcbd5dfb26d7eb4c8
Signed-off-by: v.riznyk <v.riznyk@samsung.com>
16 months ago[IOT-2052] Update to support OCF 1.0 73/24273/14
v.riznyk [Wed, 7 Mar 2018 11:53:48 +0000 (13:53 +0200)]
[IOT-2052] Update to support OCF 1.0

Update Cred recource with adding partial generating CBOR.

Change-Id: I25dcf3d020da09c67d0769eee8659d85253b4f5d
Signed-off-by: v.riznyk <v.riznyk@samsung.com>
16 months agoFix two more problems building with Python3 09/24609/3
Mats Wichmann [Sat, 7 Apr 2018 23:46:27 +0000 (17:46 -0600)]
Fix two more problems building with Python3

The boost script used string.replace() which is no longer
supported; problem did not turn up until trying a build on Windows

The security - provisioning - unittest script had a Windows
stanza for killing running server processes before launching a
new one. It printed the process id it was going to kill in a way
that caused an AttributError exception - this was a conversion
error from when print statement was changed to print function,
again the code path had not been hit. At the same time a second
exception ocurred because when the first exception took place the
script attempted to us the message attribute of the exception for
printing, but not all exceptions have such an attribute. Change
to just print the string representation of the exception, which
is more reliable.

Additionally, in the libcoap script, the term 'string' is used
which while not broken since the script never imports the string
module, is unnecessarily ambiguous. Use the Python recommended
disambiguation of adding a trailing underscore on an identifier
which might match one used by Python.

Change-Id: I635796a6442caacb6988e21dbe46938f860e333f
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months agoMemory leak in security spresource 15/24615/3
Mats Wichmann [Mon, 9 Apr 2018 15:52:53 +0000 (09:52 -0600)]
Memory leak in security spresource

In TestEncodeDecode, a profile is allocated and filled;
it is unwound but not deallocated, leading to valgrind
memory leak report like this:

32 bytes in 1 blocks are definitely lost in loss record 130 of 271

The freeing change eliminates nine such reports, one for
each call to the function.

Change-Id: I8b1223f7b832d4fafac4d7225ea2544fc348a7a4
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months agoUse `URI` all caps in documentation 59/24559/2
George Nash [Tue, 3 Apr 2018 19:00:18 +0000 (12:00 -0700)]
Use `URI` all caps in documentation

URI is all caps when used in documentation

Fixed instances where param document parameters
[in], [out] and [in,out] were used incorrectly.

A few other minor documentation issues cleaned up.

Change-Id: Ic9db0c22a667d371fd1ca00c60b5bbceba6a3c77
Signed-off-by: George Nash <george.nash@intel.com>
16 months agoresource-container: Install unit tests 79/24479/4
Philippe Coval [Fri, 23 Mar 2018 10:44:03 +0000 (11:44 +0100)]
resource-container: Install unit tests

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I1b88b500f18445ea145c24a8e52ea07c6b11c521
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agoFix issues found using static code analysis 89/24589/3
George Nash [Thu, 5 Apr 2018 18:32:14 +0000 (11:32 -0700)]
Fix issues found using static code analysis

Fixed possible issue that the for loop could be
accessing element outside the array. Replaced the
variables holding the size of the array with a
compile time calculation. Removed separate member varaible
use to track the size of the resource type array and
the resource interface array.

Changed the initialization of m_dimmingLightServer from
C++11 initializer list style to C++98 initializer style
due to this causing build failure on gcc/g++ v4.8.4.
Issue reported by Abhishek Pandey

Change-Id: I553e661dbd2e6fa3fe38d8694d88273c5b309c58
Signed-off-by: George Nash <george.nash@intel.com>
16 months agoscene-manager: Install unit tests 85/24485/3
Philippe Coval [Fri, 23 Mar 2018 10:45:37 +0000 (11:45 +0100)]
scene-manager: Install unit tests

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I9db429a928d6fb5084948a7122c2a4f0151829bd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agoresource: Install unit tests 83/24483/6
Philippe Coval [Fri, 23 Mar 2018 10:45:14 +0000 (11:45 +0100)]
resource: Install unit tests

logger tests are renamed to more meaningful names,
note that yocto used different names (logger_test_c/cpp),
I aligned to upstream's sources.

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/24483/
Change-Id: Ib5eabdece4414801cd08d27671bb759d27914174
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agocsdk: Install unit tests 81/24481/4
Philippe Coval [Fri, 23 Mar 2018 10:44:47 +0000 (11:44 +0100)]
csdk: Install unit tests

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ie1e99e3c06d1723730d81621e78a941df1b031f9
Origin: https://gerrit.iotivity.org/gerrit/#/c/24481/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months ago1.2 support 73/23873/8
Oleksandr Dmytrenko [Fri, 24 Nov 2017 12:24:17 +0000 (14:24 +0200)]
1.2 support

old version servers support

Change-Id: I2f7d54c0ff6b4a372b82c4e99263af4df2c98a4e
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
(cherry picked from commit cf3012285f8eff116acc3d8971a293e12af38f8d)
Origin: https://gerrit.iotivity.org/gerrit/#/c/23445/

16 months agoIOT-3045 Fix return type of getResourceHandleAtUri 75/24575/3
George Nash [Wed, 4 Apr 2018 19:27:47 +0000 (12:27 -0700)]
IOT-3045 Fix return type of getResourceHandleAtUri

OcPlatfrom.getResourceAtUri should return null
when a resource is not found at the specified
URI. The class JniOcResourceHandle returned
a non-null value even when a null resourceHandle
was passed into the function. The assumption
when the code was originally created was that
it would return null. This assumption was incorrect.

This was tested by modifying simpleserver sample
Modifications not included as part of this commit.

Bug: https://jira.iotivity.org/browse/IOT-3045
Change-Id: I3e923dca3415e9e0ec473b1dd4ff4619538f325b
Signed-off-by: George Nash <george.nash@intel.com>
16 months agoconnectivity: Declare strict void function 69/23969/10
Philippe Coval [Mon, 22 Jan 2018 09:06:39 +0000 (10:06 +0100)]
connectivity: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I71c37805b5fb60b4d8e1c78845194979fb18f9af
Origin: https://gerrit.iotivity.org/gerrit/#/c/23969/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agosecurity: Declare strict void function 71/23971/6
Philippe Coval [Mon, 22 Jan 2018 09:09:35 +0000 (10:09 +0100)]
security: Declare strict void function

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I8597f301bb7f2fbe11b4dc46f1eab8620a714da4
Origin: https://gerrit.iotivity.org/gerrit/#/c/23971/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agoeasy-setup: Install unit tests 77/24477/4
Philippe Coval [Fri, 23 Mar 2018 11:09:32 +0000 (12:09 +0100)]
easy-setup: Install unit tests

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I36ec02bc79d41c8cc3627c51a6eecc6e5f322b17
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agotinycbor version bump 31/24531/2
Mats Wichmann [Sun, 1 Apr 2018 21:37:40 +0000 (15:37 -0600)]
tinycbor version bump

bugfix release: upstream is now on 0.5.1 - one fix is for a bug that an
iotivity user actually ran into, so it is a fix we want to pick up.

Bug: https://jira.iotivity.org/browse/IOT-3019
Change-Id: I0be712b375e16047161f5416fd2c61f94c676db3
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months agoSample implementation of ocf_light 63/24263/24
George Nash [Fri, 9 Feb 2018 22:57:25 +0000 (14:57 -0800)]
Sample implementation of ocf_light

This sample borrows a lot of code from the server
sample generated from the DeviceBuilder project
https://github.com/openconnectivityfoundation/DeviceBuilder

Eventhough this borrows a lot of code from the
DeviceBuilder project it has been modified to make
it more useful as an example separating the code into
smaller classes and adding helper classes.

This code has been run against the OCF CTT. See the
README.md file for more information about the CTT
results.

Change-Id: If0ae5e3527517bb722648a614fbd96f13ad01144
Signed-off-by: George Nash <george.nash@intel.com>
16 months agofix cloud unitialized pointer dereference 23/24523/1
Mats Wichmann [Thu, 29 Mar 2018 18:45:20 +0000 (12:45 -0600)]
fix cloud unitialized pointer dereference

Change-Id: I869aa695160203ebb1d0cb0701c3d43f55278c41
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months ago[IOT-2928][IOT-3017][IOT-3022] 27/24427/19
Oleksii Beketov [Wed, 28 Mar 2018 14:57:05 +0000 (17:57 +0300)]
[IOT-2928][IOT-3017][IOT-3022]

The cloud provisioning:
1. sid add
2. get cloud status request add
3. Remove 'accesstoken' from coapcloudconf resource response

Change-Id: I5f5c1aa7ae414f02f6d1c288258084cacfdd1ed0
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
16 months agobuild: Align yocto to linux 57/24457/5
Philippe Coval [Thu, 22 Mar 2018 19:58:20 +0000 (20:58 +0100)]
build: Align yocto to linux

Until next refactoring it's safe to keep yocto aligned to linux,
at least only on this file, because OS is set to linux at bottom line.

Problem was observed when build using:

  EXTRA_OESCONS += " TARGET_TRANRSPORT=IP"
  EXTRA_OESCONS += " WITH_CLOUD=True"
  EXTRA_OESCONS += " WITH_TCP=True"
  EXTRA_OESCONS += " WITH_MQ=PUB,SUB"

Change-Id: I2bd6d9e32c9819d6cd485dc9d7691e213f33f2a1
Origin: https://gerrit.iotivity.org/gerrit/#/c/24457/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agoAlign license file 45/24045/4
Mats Wichmann [Tue, 30 Jan 2018 19:02:13 +0000 (12:02 -0700)]
Align license file

Minor:
The current LICENSE.md file is modified from the Apache original.
The modification is mostly incorrect (the change made is
intended for other source files, as described in the Appendix
in the original, not for the license file itself).  Restored the
pristine original.

Main problem addressed: github mirror misidentifies the license
of the project, since the first few lines do not match the
known text of the Apache 2.0 license.

Change-Id: Ia994002384bf93fa999ac634bc6d4c711b5c9d60
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months agosecurity: Declare strict void function 27/24127/2
Philippe Coval [Fri, 9 Feb 2018 10:09:06 +0000 (11:09 +0100)]
security:  Declare strict void function

Declare void functions as strict prototype
If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I126edf8d9f74bbe679617a84b2e964a546422709
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
16 months agoFix build warnings in credresource.c 95/24495/2
George Nash [Tue, 27 Mar 2018 19:33:46 +0000 (12:33 -0700)]
Fix build warnings in credresource.c

Fixed downcastig warning from size_t to int.

Fixed unused parameter warnings.

Change-Id: Ieb9139d79995bb09ce4afedcfe35b2293759f879
Signed-off-by: George Nash <george.nash@intel.com>
16 months agoAdjust provisioning unit test 93/24493/1
Mats Wichmann [Tue, 27 Mar 2018 18:20:38 +0000 (12:20 -0600)]
Adjust provisioning unit test

A test of registerDisplayPinCallback passes a null callback
argument, and a valid callback handler pointer argument,
but checks the resolt for OC_STACK_INVALID_PARAM (which
would be the case if the handler pointer was null) instead
of OC_STACK_INVALID_CALLBACK.

Change-Id: I9d5e529cc1e0da580f8cc853d6692ff8efb31b93
Signed-off-by: Mats Wichmann <mats@linux.com>
16 months agoca ssl adapter msgs 13/24413/4
Oleksandr Dmytrenko [Fri, 16 Mar 2018 08:58:13 +0000 (10:58 +0200)]
ca ssl adapter msgs

Print ca ssl adapter messages

Change-Id: I8f044e368caf75dc0212fad4edffd6c8c5c14ca2
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
16 months agoCertificate Logging Improvement 73/24473/2
Oleksii Beketov [Mon, 26 Mar 2018 12:29:35 +0000 (15:29 +0300)]
Certificate Logging Improvement

Allow to log the cert entirely

Change-Id: I69cdef6f49323dda8c0d24df8b8f702f86847664
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>