contrib/iotivity.git
7 years agoWIP: mod: service/easy-setup/enrollee/src/resourcehandler.h (sandbox/pcoval/on/master...
Philippe Coval [Wed, 29 Mar 2017 16:42:52 +0000 (18:42 +0200)]
WIP: mod: service/easy-setup/enrollee/src/resourcehandler.h (sandbox/pcoval/on/master/debian)

easysetup: Declare used function

Change-Id: I88238cdeac3b70aece350072b83198f88770ccf7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agotinycbor
Philippe Coval [Wed, 29 Mar 2017 16:34:54 +0000 (18:34 +0200)]
tinycbor

Change-Id: I89a912e869a778eeb1d9cb12303bddaffc4d6d57
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoRevert "WIP: mod: resource/src/SConscript (sandbox/pcoval/on/master/debian)"
Philippe Coval [Fri, 24 Mar 2017 14:13:20 +0000 (15:13 +0100)]
Revert "WIP: mod: resource/src/SConscript (sandbox/pcoval/on/master/debian)"

This reverts commit 4aca4539b4e665b429f5db9fb0abb782ac57e035.

7 years agoWIP: mod: resource/src/SConscript (sandbox/pcoval/on/master/debian)
Philippe Coval [Fri, 24 Mar 2017 14:13:13 +0000 (15:13 +0100)]
WIP: mod: resource/src/SConscript (sandbox/pcoval/on/master/debian)

Change-Id: I4dc581e7d133318d0270aa4d252c8b09c8282c72
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: resource/src/SConscript (sandbox/pcoval/on/master/debian)
Philippe Coval [Fri, 24 Mar 2017 13:54:01 +0000 (14:54 +0100)]
WIP: mod: resource/src/SConscript (sandbox/pcoval/on/master/debian)

Change-Id: I26dd585392b27af08edc7f8b52f109d90a77ecef
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP
Philippe Coval [Fri, 24 Mar 2017 13:47:37 +0000 (14:47 +0100)]
WIP

Change-Id: I53966697f0e610bafc656dfed41ece13463909af
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: Makefile (sandbox/pcoval/on/master/debian)
Philippe Coval [Fri, 24 Mar 2017 02:03:09 +0000 (03:03 +0100)]
WIP: mod: Makefile (sandbox/pcoval/on/master/debian)

Change-Id: I3f089484496be7a717a57a938ec2bf2e2defaff5
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: Makefile (sandbox/pcoval/on/master/debian)
Philippe Coval [Fri, 24 Mar 2017 02:01:34 +0000 (03:01 +0100)]
WIP: mod: Makefile (sandbox/pcoval/on/master/debian)

Change-Id: I1a741ca388a0d1c9f18ca15bfa3ebb49247b2cfb
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: Makefile (sandbox/pcoval/on/master/debian)
Philippe Coval [Thu, 23 Mar 2017 18:16:26 +0000 (19:16 +0100)]
WIP: mod: Makefile (sandbox/pcoval/on/master/debian)

Change-Id: I30c453e4e73366a8023f1162103b7407937e2179
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: .gitignore (sandbox/pcoval/on/master/debian)
Philippe Coval [Wed, 22 Mar 2017 18:57:33 +0000 (19:57 +0100)]
WIP: mod: .gitignore (sandbox/pcoval/on/master/debian)

Change-Id: I3d854349dae6bfed990c81ab060be1cacfc8cbca
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: debian/control (sandbox/pcoval/esp8266)
Philippe Coval [Thu, 23 Mar 2017 19:33:09 +0000 (20:33 +0100)]
WIP: mod: debian/control (sandbox/pcoval/esp8266)

Signed-off-by: Philippe Coval <rzr@gna.org>
7 years agoWIP: mod: debian/iotivity0.install (sandbox/pcoval/on/master/debian)
Philippe Coval [Wed, 22 Mar 2017 18:56:10 +0000 (19:56 +0100)]
WIP: mod: debian/iotivity0.install (sandbox/pcoval/on/master/debian)

Change-Id: I4fd53a584b52140d6694f980dcb1acd1906ee323
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agombedtls: Use patch command as fallback and trap errors
Philippe Coval [Wed, 22 Mar 2017 08:27:25 +0000 (09:27 +0100)]
mbedtls: Use patch command as fallback and trap errors

This will be helpful for Tizen and others OS.

If lib is bundled as "imported git patch"
then application of "duplicated ocf.patch as git patch",
is not needed anymore, and relies on scons.

To tizen maintainers:
From now on let's maintain only one version in tree,
ealier versions of git patches can be reverted,
For reference check:
https://wiki.iotivity.org/tizen#maintenance_tips

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I0598ddd5c846a2286218879d57381ec2f20c17a4
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: debian/iotivity0.install (sandbox/pcoval/on/master/debian)
Philippe Coval [Mon, 20 Mar 2017 17:54:23 +0000 (18:54 +0100)]
WIP: mod: debian/iotivity0.install (sandbox/pcoval/on/master/debian)

Change-Id: I00ee7caa07cc2d81f5dbb872380fe366e7fe452b
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoRevert "build: Disable security by default"
Philippe Coval [Mon, 20 Mar 2017 17:12:01 +0000 (18:12 +0100)]
Revert "build: Disable security by default"

This reverts commit 24d395a2be8affb35229d5b29a8e240269b97b73.

Conflicts:
Makefile

Change-Id: Ia958c6cdabab8ae4917c08ffcd7279f5075b640c

7 years agoWIP: mod: Makefile (sandbox/pcoval/on/master/debian)
Philippe Coval [Mon, 20 Mar 2017 16:16:20 +0000 (17:16 +0100)]
WIP: mod: Makefile (sandbox/pcoval/on/master/debian)

Change-Id: Ibbdc82f1a2e7528ad03fb474488b85673a8b3f04
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoWIP: mod: Makefile (sandbox/pcoval/on/master/debian)
Philippe Coval [Mon, 20 Mar 2017 16:10:22 +0000 (17:10 +0100)]
WIP: mod: Makefile (sandbox/pcoval/on/master/debian)

Change-Id: Icf72f07abb26a4fdf46f1a864ba694eaa4bf8786
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agobuild: Enable debug mode
Philippe Coval [Sat, 11 Mar 2017 00:02:09 +0000 (01:02 +0100)]
build: Enable debug mode

Change-Id: I4e08608418baf81899ece9ba3d7b5acb5823bbb0
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Conflicts:
Makefile

7 years agobuild: Disable security by default
Philippe Coval [Thu, 9 Mar 2017 11:26:29 +0000 (12:26 +0100)]
build: Disable security by default

Change-Id: I13b1e942a31b2b083a901b75a2571389cb8ff8d3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Conflicts:
Makefile

7 years agobuild: Add install feature for downstream
Philippe Coval [Tue, 6 Sep 2016 08:17:56 +0000 (10:17 +0200)]
build: Add install feature for downstream

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ice8f4de89ffdaad5a83aa80ca266edc836fbf6a0
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agorapidjson: Import 1.0.2
Philippe Coval [Fri, 24 Feb 2017 20:48:50 +0000 (21:48 +0100)]
rapidjson: Import 1.0.2

Change-Id: Ia3ba542040218839fd5625e4a4f1ea73de3d1856
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agogtest: Import googletest-release-1.7.0
Philippe Coval [Fri, 10 Mar 2017 17:27:03 +0000 (18:27 +0100)]
gtest: Import googletest-release-1.7.0

Change-Id: Ide6d88f6247c654347c539e4a594465f9e0994d3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agodebian: Bump to 1.2.1
Philippe Coval [Thu, 9 Mar 2017 21:30:00 +0000 (22:30 +0100)]
debian: Bump to 1.2.1

Change-Id: I37a665445a9e1ee59cf9f6449f56e454878c746e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agodebian: Initial packaging
Philippe Coval [Tue, 6 Sep 2016 08:11:13 +0000 (10:11 +0200)]
debian: Initial packaging

Change-Id: I7e903d0419b39aefd1d47b57e51d0442109e7a85
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agombedtls: Update to mbedtls-2.4.0
Philippe Coval [Tue, 22 Nov 2016 10:21:52 +0000 (11:21 +0100)]
mbedtls: Update to mbedtls-2.4.0

Change-Id: I29c0d7c6b0d1bb50b82e9bcbeba38cfe1daa9857
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agombedtls: Import mbedtls-2.3.0
Philippe Coval [Thu, 1 Sep 2016 19:51:02 +0000 (21:51 +0200)]
mbedtls: Import mbedtls-2.3.0

It is strongly recommended to rely on scons instead,
 if not possible, this change workaround this.

For more details about building IoTivity please check:
https://wiki.iotivity.org/build

Bug: https://jira.iotivity.org/browse/IOT-820
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Change-Id: I97e8f34408dde1c95bd0587cb74834df966d2463
Origin: https://gerrit.iotivity.org/gerrit/#/c/12423/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agotinycbor: Update import to v0.4
Philippe Coval [Thu, 17 Nov 2016 10:21:00 +0000 (11:21 +0100)]
tinycbor: Update import to v0.4

Needed for IoTivity 1.2.1 and later

git "module" was converted to patch this way:

  git clone https://github.com/01org/tinycbor.git -b v0.4 extlibs/tinycbor/tinycbor
  rm -rf extlibs/tinycbor/tinycbor/.git
  git add -f  extlibs/tinycbor/tinycbor/
  git commit -sm 'tinycbor: Update import to v0.4' extlibs/tinycbor/tinycbor/

It is strongly recommended to rely on scons instead,
 if not possible, this change workaround this.

For more details about building IoTivity please check:
https://wiki.iotivity.org/build

Change-Id: I5492732be93e2b0fdf5e1c3eabcdc949b420e4fb
Bug: https://jira.iotivity.org/browse/IOT-820
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Origin: https://gerrit.iotivity.org/gerrit/#/c/11753/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agotinycbor: Update to v0.3.2
Philippe Coval [Thu, 1 Sep 2016 15:11:20 +0000 (17:11 +0200)]
tinycbor: Update to v0.3.2

Needed for IoTivity 1.2.0 and later

It is strongly recommended to rely on scons instead,
 if not possible, this change workaround this.

For more details about building IoTivity please check:
https://wiki.iotivity.org/build

Bug: https://jira.iotivity.org/browse/IOT-820
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Origin: https://gerrit.iotivity.org/gerrit/#/c/12705/
Change-Id: I9b33b8dd7a97b48b6fd3157b1ef25dadb79f11e2
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agotinycbor: Import v0.2.1
Philippe Coval [Thu, 1 Sep 2016 10:04:08 +0000 (12:04 +0200)]
tinycbor: Import v0.2.1

Needed for Iotivity-1.1.1 and lower

It is strongly recommended to rely on scons instead,
 if not possible, this change workaround this.

For more details about building IoTivity please check:
https://wiki.iotivity.org/build

Bug: https://jira.iotivity.org/browse/IOT-820
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Origin: https://gerrit.iotivity.org/gerrit/#/c/12703/
Change-Id: I0a622b8c7c47cfc4ea7afd8a3cf82720a50618bd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agohippomocks: Import sources from upstream
Philippe Coval [Mon, 5 Sep 2016 12:58:29 +0000 (14:58 +0200)]
hippomocks: Import sources from upstream

From:
  https://github.com/dascandy/hippomocks/archive/8e210c5808d490b26fff69151c801fa28d291fcb.zip

It is strongly recommended to rely on scons instead,
 if not possible, this change workaround this.

For more details about building IoTivity please check:
https://wiki.iotivity.org/build

Bug: https://jira.iotivity.org/browse/IOT-820
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Change-Id: Ibfddc7be509ec992bfaa7a7bf6759a12b56a9f02
Origin: https://gerrit.iotivity.org/gerrit/#/c/12707/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
7 years agoModify cloud dashboard for sign-up
Minji Park [Mon, 17 Apr 2017 11:16:36 +0000 (20:16 +0900)]
Modify cloud dashboard for sign-up

- change sign-up page to insert oauth provider manually
- sign-out bug fixed

Change-Id: Ie9bd0bae006a1cdc7bfabd5686e51da15c9d22d5
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19025
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoFix result of notification valgrind memory checker.
KIM JungYong [Mon, 17 Apr 2017 11:41:03 +0000 (20:41 +0900)]
Fix result of notification valgrind memory checker.

When valgrind of notification service(including cpp wrapper) is run,
several leak was detected. (memory leak and invalid use of memory)

in this patch, result of valgrind was fixed.
1. invalid use of string in the unit test code, was fixed.
2. when returnning with error, allocated memory was freed.
3. unfreed variable was freed.
4. unit test build warning was fixed.

Change-Id: I4c8367bfda86813bb1ce1c71cf7841067c489ccc
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19009
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge "Merge branch '1.3-rel'"
Greg Zaverucha [Mon, 17 Apr 2017 19:57:47 +0000 (19:57 +0000)]
Merge "Merge branch '1.3-rel'"

7 years ago[IOT-2045] Fix PIN based OTM
Dmitriy Zhuravlev [Thu, 13 Apr 2017 15:10:56 +0000 (18:10 +0300)]
[IOT-2045] Fix PIN based OTM

OTM should be able to use PSK ciphersuite
even if there is no credentials in SVR DB

Change-Id: Icfde495b61f5f726cab2604fd5fc0f5e9e88fff9
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18929
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoAdd completion callback to IPCACloseHandle().
Soemin Tjong [Wed, 1 Mar 2017 05:39:06 +0000 (21:39 -0800)]
Add completion callback to IPCACloseHandle().

This addresses the scenario where the app needs to be certain when all
callbacks related to the handle it is closing are completed.

Change-Id: I75b211d477405be27c6c804bc89e529088aa1a90
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18217
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoprovide server unavailable error(503) value in ocstack.
jihwan.seo [Tue, 11 Apr 2017 05:34:41 +0000 (14:34 +0900)]
provide server unavailable error(503) value in ocstack.

Change-Id: Ica4956debfd8112f93beab4edd23a569ea5a3ad0
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18679
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoIOT-2049 Fix Windows build break when -noSecurity is used
Way Vadhanasin [Fri, 14 Apr 2017 14:39:26 +0000 (07:39 -0700)]
IOT-2049 Fix Windows build break when -noSecurity is used

The new test recently enabled needs to include platform_features.h.

Change-Id: I8874758203453730446b2d616b497fbb235892bb
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18977
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoModified getNetAddress() in SceneUtils
ChaJiWon [Wed, 12 Apr 2017 12:12:46 +0000 (21:12 +0900)]
Modified getNetAddress() in SceneUtils

If network have IPv4 address, it returns IPv4 address.

Change-Id: Iba93339b6a980251194b02d6fa905006a88a0608
Signed-off-by: ChaJiWon <jw_wonny.cha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18675
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
(cherry picked from commit 0b1a8bce125e4543e40c4b855a64384fe7ef5865)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18681
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
7 years agoMerge branch '1.3-rel'
Kevin Kane [Thu, 13 Apr 2017 18:31:16 +0000 (11:31 -0700)]
Merge branch '1.3-rel'

Change-Id: Ib501451be069310d21bae65b1b3d1993a5b3cc1f
Signed-off-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-1986] Windows: Work around SCons race condition
Dan Mihai [Fri, 7 Apr 2017 04:39:48 +0000 (21:39 -0700)]
[IOT-1986] Windows: Work around SCons race condition

These sporadic linker errors become even more frequent when adding
more static LIBs into a single target DLL.

Change-Id: I44d2cfeda61a08cbc29cb3d7f685b87ea1cb8b9e
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18767
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoIOT-1583: Fixing libcoap W4 warnings.
Pawel Winogrodzki [Mon, 3 Apr 2017 23:14:33 +0000 (16:14 -0700)]
IOT-1583: Fixing libcoap W4 warnings.

This commit makes sure libcoap doesn't generate any W4
warnings when building with for Windows.

In addition to that automatic libcoap updates are enabled
by default for Jenkins builds and optional for regular
builds.

Change-Id: I676a98bd41c2aeb28fee7d5ed1283145fd306655
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18545
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit d3b382c901ee304d4f3466fa33758f5510fdf9d4)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18755
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoProxy samples: Add support for running with security
Veeraj Khokale [Thu, 23 Mar 2017 06:52:09 +0000 (12:22 +0530)]
Proxy samples: Add support for running with security

1. Add Persistent Storage Handlers in proxy_main.c
   and proxy_client.c.
2. Add svr db files in coap proxy samples directory and
   use them in proxy_client and proxy_main for security
   credentials and ACLs.
3. Include OC_SECURE flag while initiating proxy request
   from client.

Change-Id: Iec7ea2f3a30c2777b86064e3726db25587176c21
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18129
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoModified getNetAddress() in SceneUtils
ChaJiWon [Wed, 12 Apr 2017 12:12:46 +0000 (21:12 +0900)]
Modified getNetAddress() in SceneUtils

If network have IPv4 address, it returns IPv4 address.

Change-Id: Iba93339b6a980251194b02d6fa905006a88a0608
Signed-off-by: ChaJiWon <jw_wonny.cha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18675
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoFix bugs for invalid uri in notificaiton service.
KIM JungYong [Thu, 13 Apr 2017 06:15:12 +0000 (15:15 +0900)]
Fix bugs for invalid uri in notificaiton service.

[Problem]
Notification service sync service does not working.

[Reason]
When notification service built with TEST=0 (by default),
Sync resource uri was registered as invalid.

[Fix]
Divided sync resource uri for test, was combined.

Change-Id: I979fd8169afc15cf747796894d98a1be9e9ef853
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18885
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoProxy samples: Add support for running with security
Veeraj Khokale [Thu, 23 Mar 2017 06:52:09 +0000 (12:22 +0530)]
Proxy samples: Add support for running with security

1. Add Persistent Storage Handlers in proxy_main.c
   and proxy_client.c.
2. Add svr db files in coap proxy samples directory and
   use them in proxy_client and proxy_main for security
   credentials and ACLs.
3. Include OC_SECURE flag while initiating proxy request
   from client.

Change-Id: Iec7ea2f3a30c2777b86064e3726db25587176c21
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18797
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoProxy Service: Fix broken build.
Abhishek Sharma [Tue, 21 Mar 2017 09:51:37 +0000 (15:21 +0530)]
Proxy Service: Fix broken build.

Fixed Proxy service build issues.

Change-Id: Ib49bc0e9943d2e967a8373f170e3ecba3a237020
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18045
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[Resource-Encapsulation] Removed Linux Secured samples.
Jay Sharma [Wed, 12 Apr 2017 07:31:18 +0000 (13:01 +0530)]
[Resource-Encapsulation] Removed Linux Secured samples.

Change-Id: I5c83435c91e669100f52bdf546df6ecbf32f12f7
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18783
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2029] split scons builder code out of external_libs.scons
George Nash [Tue, 11 Apr 2017 20:23:54 +0000 (13:23 -0700)]
[IOT-2029] split scons builder code out of external_libs.scons

This splits the contents of the external_libs.scons into two
files:
   external_builders.scons
   external_libs.scons

The external_libs.scons script added scons  Psuedo-Builders
'PrepareLib', 'Download', 'UnpackAll', 'Configure',
'InstallHeadFile' and 'InstalLib' to the scons environment
The builder scripts are responsible for downloading, unpacking,
and installing different items throughout the build process.

Additionally the external_libs.scons was also responsible for
building and setting up compilar flags and building external
libraries.

The external_libs.scons used to be called before and after the
android build. Once to setup the Psuedo-Builders and again to
set the compiler flags for the external libraries. Due to some
cleanup for a recent change. The script can no longer be called
multiple times without a scons error.

see: https://gerrit.iotivity.org/gerrit/#/c/18381

Now the Psuedo-Builders are added to the scons environment by
calling external_builders.scons. The external_libs.scons is
used to build the external libraries.

This allows adding the builders that are required for the
android build. While still setting up the build environment
for the external libraries.

Due to the UnpackAll builder using the system path on windows
the external_builders.scons script must be called twice.

Additional Whitespace cleanup changed tabs into spaces to follow
convention of other scons scripts.

Change-Id: I070224425bfd2d4279cd6c9b0c329e393250770a
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18739
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoProxy Service: Fix broken build.
Abhishek Sharma [Tue, 21 Mar 2017 09:51:37 +0000 (15:21 +0530)]
Proxy Service: Fix broken build.

Fixed Proxy service build issues.

Change-Id: Ib49bc0e9943d2e967a8373f170e3ecba3a237020
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18791
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[Resource-Encapsulation] Fixes for Android and Tizen platform
Jay Sharma [Wed, 12 Apr 2017 04:40:40 +0000 (10:10 +0530)]
[Resource-Encapsulation] Fixes for Android and Tizen platform

   - Java SDK build fix.
   - Android sample Apps fix.
   - Tizen sample Apps fix.

Change-Id: Id9a2e636b2253bfed585cfcfdb9fbd2f7ca1ee75
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18779
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoChange a coap cloud server address to sign-up and sign-in
Jihun Ha [Tue, 11 Apr 2017 08:35:36 +0000 (17:35 +0900)]
Change a coap cloud server address to sign-up and sign-in

An address of coap cloud server for testing is changed to 13.124.29.169.
And an access token issued by github has no expiry time so refreshtoken
is not used anymore.

Change-Id: Ib8ef89bc075114374dd345b79f7205ec99918c7d
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18687
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix WITH_RA=1 WITH_RA_IBB=1 build break
Dan Mihai [Thu, 13 Apr 2017 03:25:12 +0000 (20:25 -0700)]
Fix WITH_RA=1 WITH_RA_IBB=1 build break

Apparently Jenkins doesn't test these until after the merge into master.

(https://build.iotivity.org/ci/job/iotivity-merge-master-linux_unsecured_with_ra/1591/)

Change-Id: I5261788b711b2e7f465fba6bfe5398e86af6a6d9
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18871
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoIOT-1994 Simplify OCStack public header file requirements
Way Vadhanasin [Wed, 12 Apr 2017 05:44:54 +0000 (22:44 -0700)]
IOT-1994 Simplify OCStack public header file requirements

Applications that need to include ocstack.h for access to OC* APIs currently need to bring in
multiple unrelated (and platform-specific) headers. This is because octypes.h, a public type
definition header used by ocstack.h, is including more headers than it needs to. It is more
desirable for applications to bring in only requird headers.

This change reduces the number of required headers from the public surface, specifically ocstack.h,
by taking advantange of IoTivity's requirement that all supported compilers are at least
C++11-compliant. See https://wiki.iotivity.org/compiler_support?s[]=compiler for details.

Before this change, users of ocstack.h must also bring in (this example is from Windows):

    Ocstack.h
    Octypes.h
    Iotivity_config.h
    Ocpresence.h
    Ocstackconfig.h
    Platform_features.h
    Windows\include\memmem.h
    Windows\include\pthread_create.h
    Windows\include\vs12_snprintf.h
    Windows\include\win_sleep.h

After this change, the list becomes:

    Ocstack.h
    Octypes.h
    Ocpresence.h
    Ocstackconfig.h

Arguably ocpresence.h and ocstackconfig.h could be combined into octypes.h since they are just
simple type definitions, just like octypes.h. That work is lower priority as both ocpresence.h
and ocstackconfig.h are already platform independent.

Change-Id: I9943589603453730446b2d616b497fbb235774a5
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18487
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1996] Make resource/csdk/connectivity W4 compliant.
Alex Kelley [Mon, 27 Mar 2017 16:38:24 +0000 (09:38 -0700)]
[IOT-1996] Make resource/csdk/connectivity W4 compliant.

These changes include the following:
- Fix W4 warnings under resource/csdk/connectivity.
- Fix W4 warnings under resource/csdk/connectivity/test.
- Enable /W4 /WX on resource/csdk/connectivity.
- Enable /W4 /WX on resource/csdk/connectivity/test.
- Update build_common/Windows/SConscript.

Change-Id: I98d93f4df6fc938f004ef2f6844ba120bb5e788a
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18535
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
(cherry picked from commit 7a811cc5b6ba90a99ada4a86da1632367a52304c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18749
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoRevert "Support secure network info in CAGetNetworkInformation"
Ziran Sun [Wed, 12 Apr 2017 11:03:50 +0000 (11:03 +0000)]
Revert "Support secure network info in CAGetNetworkInformation"

This reverts commit 5c93577b1ecdfe017ae51a7a3cc239245d300250.

Change-Id: Ic85a1e0a900143c449f60de1b8b3f984a2364ff7
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18815
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agosecurity: Add unused member to empty struct
Philippe Coval [Fri, 24 Mar 2017 01:56:14 +0000 (02:56 +0100)]
security: Add unused member to empty struct

For clang support just like MSVC

Change-Id: I2afbaae260318874634dd42d2650a87c0731e099
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18331
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoSet request timeout to EXCHANGE_LIFETIME of CoAP.
Soemin Tjong [Thu, 6 Apr 2017 22:28:59 +0000 (15:28 -0700)]
Set request timeout to EXCHANGE_LIFETIME of CoAP.

EXCHANGE_LIFETIME value is 247 seconds.

Change-Id: I95b896e8459200fbd1a02598ea1537c96a8eccef
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18591
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit b024d2ee727fddedc2d6290dfcb5c49433e30523)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18835
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1917]Fix memory leak: cert/key/CRL
Oleksandr Dmytrenko [Tue, 21 Mar 2017 13:40:52 +0000 (15:40 +0200)]
[IOT-1917]Fix memory leak: cert/key/CRL

Fix memory leak: cert/key/CRL information returned by cred resource
https://jira.iotivity.org/browse/IOT-1917

Change-Id: Ic563b5e5b79ccac8855ebb5b215e475d1b4e57be
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18057
Reviewed-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoDefine OC_CALL (call convention for public APIs).
Soemin Tjong [Fri, 3 Mar 2017 08:13:17 +0000 (00:13 -0800)]
Define OC_CALL (call convention for public APIs).

Set to __stdcall for WIN32.
Add to IPCA public APIs.
Other public APIs will be updated in separate commit.

Change-Id: I3201b7088eeb2227d2681847d20172825fbf4cae
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18169
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years ago[IOT-2010] Move PMGenerateQuery export to octbstack_product_secured.def
Alex Kelley [Fri, 7 Apr 2017 20:02:07 +0000 (13:02 -0700)]
[IOT-2010] Move PMGenerateQuery export to octbstack_product_secured.def

Change-Id: I8033841aa2217978fbb04cf0ae3494b93bb64f72
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18625
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoSet request timeout to EXCHANGE_LIFETIME of CoAP.
Soemin Tjong [Thu, 6 Apr 2017 22:28:59 +0000 (15:28 -0700)]
Set request timeout to EXCHANGE_LIFETIME of CoAP.

EXCHANGE_LIFETIME value is 247 seconds.

Change-Id: I95b896e8459200fbd1a02598ea1537c96a8eccef
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18591
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd check secure port info from EndPoints for Provisioning manager.
Ziran Sun [Fri, 7 Apr 2017 15:09:52 +0000 (16:09 +0100)]
Add check secure port info from EndPoints for Provisioning manager.

With OCF1.0 in place, secure and port are removed from policy schema.
These information are now available in EndPoints. Add support for this.
Otherwise provision discovery fails for format vnd_cbor.

Bug: https://jira.iotivity.org/browse/IOT-1987
Change-Id: I999aca98c6e7c5ba16dc1c63e7348c977daf8924
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18605
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoSupport secure network info in CAGetNetworkInformation
hyuna0213.jo [Thu, 6 Apr 2017 10:25:40 +0000 (19:25 +0900)]
Support secure network info in CAGetNetworkInformation

Secured network interface information should be provided

Change-Id: I65fe446d84ed67e00486782901b8b9f07f47c32c
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18565
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoIOT-1583: Fixing libcoap W4 warnings.
Pawel Winogrodzki [Mon, 3 Apr 2017 23:14:33 +0000 (16:14 -0700)]
IOT-1583: Fixing libcoap W4 warnings.

This commit makes sure libcoap doesn't generate any W4
warnings when building with for Windows.

In addition to that automatic libcoap updates are enabled
by default for Jenkins builds and optional for regular
builds.

Change-Id: I676a98bd41c2aeb28fee7d5ed1283145fd306655
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18545
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1996] Make resource/csdk/connectivity W4 compliant.
Alex Kelley [Mon, 27 Mar 2017 16:38:24 +0000 (09:38 -0700)]
[IOT-1996] Make resource/csdk/connectivity W4 compliant.

These changes include the following:
- Fix W4 warnings under resource/csdk/connectivity.
- Fix W4 warnings under resource/csdk/connectivity/test.
- Enable /W4 /WX on resource/csdk/connectivity.
- Enable /W4 /WX on resource/csdk/connectivity/test.
- Update build_common/Windows/SConscript.

Change-Id: I98d93f4df6fc938f004ef2f6844ba120bb5e788a
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18535
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoChange OICFree to NSOICFree in notification provider codes
jake [Tue, 28 Mar 2017 05:53:21 +0000 (14:53 +0900)]
Change OICFree to NSOICFree in notification provider codes

 - Be used OICFree without NULL checking.

Change-Id: I1ce65d0e41a3b9f276a2b517d7b3d1c06faa92e6
Signed-off-by: jake <jaehong2.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18239
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agohippomocks: Update to latest release (v5.0)
Philippe Coval [Fri, 24 Mar 2017 10:20:01 +0000 (11:20 +0100)]
hippomocks: Update to latest release (v5.0)

Refactor build scripts too

Previously we used revision:
8e210c5808d490b26fff69151c801fa28d291fcb

Since upstream tagged a version, so it's safer to align to it.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ib6674b60f70dbae163feea447273324bf7827d6d
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18365
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoMerge "Merge branch 'cloud-interface'"
Jee Hyeok Kim [Mon, 10 Apr 2017 10:03:43 +0000 (10:03 +0000)]
Merge "Merge branch 'cloud-interface'"

7 years agoCreate links OCRepPayloadValue for collection resource
uzchoi [Mon, 27 Mar 2017 12:41:29 +0000 (21:41 +0900)]
Create links OCRepPayloadValue for collection resource

By adding the payload definition includes links parameter in linklist
interface for collection. Server application developer should implement
it to comply to OCF specification, but this requires lots of coding work
with holding the policy map info and so on.

This API returns back links parameter which can be set as response
payload for linklist request for collection.
OCRepPayloadValue created by this function has following struct in depth.

 OCRepPayloadValue.arr->objArray[] as each resource links payload
   ..objArray[]->values->obj as policyMap

Patch10 include tcp, tls port in the policy map.
relocate code into occollection.c to better cohesion

Change-Id: I399c5b6e40d0a00f43e106619cdc17ac480ed985
Reviewed-on: https://gerrit.iotivity.org/gerrit/18195
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoMerge branch 'cloud-interface'
Jee Hyeok Kim [Fri, 7 Apr 2017 06:05:51 +0000 (15:05 +0900)]
Merge branch 'cloud-interface'

Change-Id: I4560ca5c7cb12782701051e72cca9ec014c14587
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoFix build break from bad merge
Kevin Kane [Fri, 7 Apr 2017 17:59:39 +0000 (10:59 -0700)]
Fix build break from bad merge

Change-Id: I37004fce7b941bf7ecd37e77defa481974c0bac4
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18615
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Tested-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1992] Bug in the ocf.patch
ol.beketov [Thu, 6 Apr 2017 12:13:24 +0000 (15:13 +0300)]
[IOT-1992] Bug in the ocf.patch

Bug in the ocf.patch while adding
TLS_ECDH_anon_WITH_AES_128_CBC_SHA
suite to the library(in ssl_cli.c)

Change-Id: I1f97c096e1f67f3b65e44d915ba8b9f115bee586
Signed-off-by: ol.beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18439
Reviewed-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-1950] Add default ACL for roles resource
Greg Zaverucha [Wed, 29 Mar 2017 22:25:09 +0000 (15:25 -0700)]
[IOT-1950] Add default ACL for roles resource

Update the default ACL to include access to the roles resource.
Fix double-free on error paths in GetDefaultACL.
Update .json/.dat files for samples and unit tests containing the default ACL.
Remove workaround from end-to-end tests.
Add unit test to check default ACL includes ACE for roles resource.

Change-Id: Icff8e64195f1ce75ad6e3b05c8e2de1763eaf653
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18465
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years ago[IOT-2005] Correct PEM encoding of test certs in SSL tests
Kevin Kane [Thu, 6 Apr 2017 16:57:03 +0000 (09:57 -0700)]
[IOT-2005] Correct PEM encoding of test certs in SSL tests

mbedTLS insists on newlines in PEM data, and the lack thereof is
causing SSL adapter tests to fail. Add newlines to the test certs
for correct parsing.

Change-Id: I5c42dbd648bf111ac00f746d4e59fc4a9a224208
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18575
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years ago[IOT-1785] Implement roles from symmetric pair-wise keys
Kevin Kane [Wed, 29 Mar 2017 20:26:01 +0000 (13:26 -0700)]
[IOT-1785] Implement roles from symmetric pair-wise keys

Implement roleId property of an oic.sec.cred object.

Fix error path bugs in CRED<->CBOR code to fail properly if
certain serialization subroutines fail; error codes were
being ignored. Fix error path memory leaks.

Also fix the ACL/ACL2<->CBOR code to use the correct JSON
field names per the schema. Fix error path memory leaks.

Change-Id: Ie9aa8baba5903c482acb3adc6ef617a1ced7db31
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18463
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoRemove uses of WITH_X509
Greg Zaverucha [Thu, 6 Apr 2017 21:32:35 +0000 (14:32 -0700)]
Remove uses of WITH_X509

GetCredEntryByCredId was using WITH_X509 instead of WITH_DTLS,
causing a block of code to not be included in certain build
configurations.

Change-Id: I16c05f38c7d2e317a727d6480289151e30229d71
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18581
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years ago[IOT-1939] Fix for failure of test cases in C++ Notification Service due to time...
Poovizhi [Mon, 27 Mar 2017 13:49:01 +0000 (19:19 +0530)]
[IOT-1939] Fix for failure of test cases in  C++ Notification Service due to time delay

Unit test of notification service sometimes fails due to time delay.
In this patch, network related procedure was separated in C++ layer of notification service.
The changes are based on the C layer changes from the patch "https://gerrit.iotivity.org/gerrit/#/c/17397"

Change-Id: Ib0c859f9052be2049135226cc6abd9f314875b09
Signed-off-by: Poovizhi <poovizhi.a@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18197
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd two APIs in EnrolleeConf class
Jihun Ha [Mon, 3 Apr 2017 12:07:13 +0000 (21:07 +0900)]
Add two APIs in EnrolleeConf class

The two APIs are added in EnrolleConf class so that provisioning status
and last error code properties can be passed to application as a response
of getConfiguration API call.
Note that those APIs are already provided in EnrolleeStatus class which
is a GET request with baseline interface.

Change-Id: I46133a189fff5201df9526bf2ef6009834ab77ab
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18445
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoAdd Firmware update sample
Minji Park [Mon, 3 Apr 2017 04:15:00 +0000 (13:15 +0900)]
Add Firmware update sample

Change-Id: I4c3609551932f7d80996074060dc71d199475841
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18475
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoFixed missing null terminator in mpm_sample_client
George Nash [Tue, 4 Apr 2017 22:00:04 +0000 (15:00 -0700)]
Fixed missing null terminator in mpm_sample_client

The string in contained in the MPMMessage passed to the onCallback
funtion may not be null terminated.

This is accounted for when creating the message_char variable but
the message_char variable was not used when MPMAddDevice was called
causing a non-terminated string to be passed to the to the plugin.

Using the message_char variable with size+1 solved the missing null
terminated string issue.

Change-Id: If760cc77fba9fe46b191b3c5a7ec2abac9da63ac
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18491
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
7 years agoIOT-1583: Updating cJSON version to remove /W4 warnings.
Pawel Winogrodzki [Wed, 29 Mar 2017 19:24:38 +0000 (12:24 -0700)]
IOT-1583: Updating cJSON version to remove /W4 warnings.

The code is updated to commit b0db7a6308f8948dd4a68f06b787cb425ce7254d
from the main cJSON repo: https://github.com/DaveGamble/cJSON.

Change-Id: I43b2bae1fa4fde5eee12f7d74990d5263f4ec51b
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18381
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoFix a wrong calculation of buffer size to make coap options
Jihun Ha [Tue, 4 Apr 2017 02:32:32 +0000 (11:32 +0900)]
Fix a wrong calculation of buffer size to make coap options

A 'buflen' variable produced by coap_split_query has a meaning of
remained buffer size after filling a set of coap query options to pBuf which
has CA_MAX_URI_LENGTH(512) size.
It means option data is filled upto pBuf + (CA_MAX_URI_LENGTH - buflen).
Thus, accessing pBuf can reach to the above location.

Change-Id: I1320531730800a57e78e4bc56552c51525903468
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18363
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoPython no longer prefers use of has_key method, use "in" instead
Mats Wichmann [Fri, 10 Mar 2017 20:22:28 +0000 (13:22 -0700)]
Python no longer prefers use of has_key method, use "in" instead

Fix sense of one test broken in first version.

Change-Id: I0374d68320fd4591c8f3e8632322682b5c573f39
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17839
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoPrint elevator server's device ID.
Soemin Tjong [Tue, 4 Apr 2017 21:47:30 +0000 (14:47 -0700)]
Print elevator server's device ID.

This simplifies identifying the target elevator when there are multiple
of them running.

Also, remove hardcoded device ID in the configuration file so multiple
servers don't conflict.

Change-Id: I18b318c844e769529ae9f50e79ff85114a9f5b6d
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18489
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoUpdate IPCA to use new OCPlatform::start/stop().
Soemin Tjong [Wed, 29 Mar 2017 00:49:30 +0000 (17:49 -0700)]
Update IPCA to use new OCPlatform::start/stop().

https://jira.iotivity.org/browse/IOT-1966

This allows the IoTivity stack to shut down gracefully after
applications call IPCAClose().

Change-Id: Ie800577f157e4ce2a6b7086495501cda8fe133d4
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18379
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoAdd clearing network callback info when CATerminate()
Jaewook Jung [Mon, 3 Apr 2017 02:26:26 +0000 (11:26 +0900)]
Add clearing network callback info when CATerminate()

Change-Id: Ie6b2ecd307e93e92f67340fe494076b3f0ae2778
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18427
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoadded option field related to accept and content version
Jung Seungho [Tue, 4 Apr 2017 07:45:38 +0000 (16:45 +0900)]
added option field related to accept and content version

- added get, set accpet & content version
- added DEFAULT_VERSION_VALUE
- modified encodeOptions function in CoapEncoder

Change-Id: I5ca387a49fbf6e1eaf70cfd1e249b04d0aa3ddcf
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18473
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoadd websocket feature and dashboard
Minji Park [Wed, 5 Apr 2017 04:13:39 +0000 (13:13 +0900)]
add websocket feature and dashboard

- added dashboard using websocket
- modified websocket spec related to length 0
- added websocket client

Change-Id: I14bf29702165448d364d7544544519b48866e1c0
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18519
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Yeonghun Nam <yeonghun.nam@samsung.com>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoIOT-1985: Fixing SimpleClientServer include paths.
Pawel Winogrodzki [Fri, 31 Mar 2017 18:54:46 +0000 (11:54 -0700)]
IOT-1985: Fixing SimpleClientServer include paths.

SimpleClientServer adds libcoap to its include paths,
which is no longer needed.

Change-Id: I613205e50d1b2f45ae51fa5eed9e036f6d6cc151
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18411
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoWindows: Remove unused provision exports
Dan Mihai [Fri, 31 Mar 2017 23:53:24 +0000 (16:53 -0700)]
Windows: Remove unused provision exports

Those functions are intended to be used internally, by security
provisioning code. It was a mistake to export them in the previous
IoTivity release.

Change-Id: If624a73e6c00c04b027de0567b5c77ef7a017a25
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18419
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
7 years agoIOT-1583: Removing /W4 warnings from mbedtls.
Pawel Winogrodzki [Mon, 20 Mar 2017 19:39:43 +0000 (12:39 -0700)]
IOT-1583: Removing /W4 warnings from mbedtls.

Removing all /W4 warnings from mbedtls and adding
/WX to the mbedtls' SConscript to make sure no new ones
get added.

I'm adding a separate header for Windows builds, because
they require a different set of macros to build correctly
("MBEDTLS_HAVE_WINSOCK2" has to be available). The config
headers are not generated automatically for mbedTLS and
a default version is just checked into the repo, so each
separate configuration/platform build requires a separate
header.

Change-Id: I3b423fb2d0b978da5e9907e58df6b6818533ba22
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18013
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agocsdk: Relocate timerlib to c_common/octimer
Philippe Coval [Mon, 20 Mar 2017 14:07:28 +0000 (15:07 +0100)]
csdk: Relocate timerlib to c_common/octimer

It never was an external library while it was located there,
the code is small enough to be part c_common utility library.

No functionnal changes were introduced, just reformated source.

Note, For Arduino, timer object is built using C++ compiler tricks,
that could be removed once support is dropped.

Bug: https://jira.iotivity.org/browse/IOT-1889
Change-Id: I776c5273315a7552495974f58a199a38073fb45e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18009
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agofix JNI crash issue related send data for android BLE
jihwan.seo [Fri, 31 Mar 2017 07:55:57 +0000 (16:55 +0900)]
fix JNI crash issue related send data for android BLE

Change-Id: Ie7a4b5268f445a4c9da50dd0acec9a9b8a8e06e1
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18401
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years agoFix build issue caused by #16731
Andrii Shtompel [Tue, 4 Apr 2017 15:05:27 +0000 (18:05 +0300)]
Fix build issue caused by #16731

Patchset #16731 changed callback API, and then some time it wasn't rebased.
During that time CA API tests were updated, and old callback API were used.
Gerrit showed no conflicts, Jenkins build were successful.
It is required to rebase more frequently.

I've fixed build error + fix compiler warnings in that file.

Change-Id: I360f22cba5ec70075eff4f814f319678bbf099c8
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18481
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoAdd missing system include <string.h>, if available
Mats Wichmann [Wed, 29 Mar 2017 21:28:12 +0000 (15:28 -0600)]
Add missing system include <string.h>, if available

Purpose is to squish recently introduced warnings:

resource/c_common/oic_platform/src/oic_platform.c: In function 'HashStrToUuid':
resource/c_common/oic_platform/src/oic_platform.c:92:5: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]
     memcpy(platformUuid, hash, OIC_UUID_LENGTH);
     ^~~~~~
resource/c_common/oic_platform/src/oic_platform.c:92:5: warning: incompatible implicit declaration of built-in function 'memcpy'
resource/c_common/oic_platform/src/oic_platform.c:92:5: note: include '<string.h>' or provide a declaration of 'memcpy'
In file included from resource/c_common/oic_platform/src/oic_platform.c:57:0:
resource/c_common/oic_platform/src/oic_platform.c: In function 'OICGetPlatformUuid':
resource/c_common/oic_platform/src/oic_platform.c:119:67: warning: implicit declaration of function 'strerror' [-Wimplicit-function-declaration]
         OIC_LOG_V(WARNING, TAG, "Failed gethostname() errno: %s", strerror(errno));
                                                                   ^
resource/c_common/oic_platform/src/oic_platform.c:154:42: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
     if (!HashStrToUuid(fqdnComputerName, strlen(fqdnComputerName), platformUuid))
                                          ^~~~~~
resource/c_common/oic_platform/src/oic_platform.c:154:42: warning: incompatible implicit declaration of built-in function 'strlen'
resource/c_common/oic_platform/src/oic_platform.c:154:42: note: include '<string.h>' or provide a declaration of 'strlen'

Change-Id: Ic3755bd59fd80b68011352117c09c88d27b5e4fa
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18351
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoAdd a README.md to give clearer guidance to github users.
Mats Wichmann [Thu, 16 Mar 2017 15:00:34 +0000 (09:00 -0600)]
Add a README.md to give clearer guidance to github users.

The information just points to various resources, may be
useful to others as well.

Revised version to reflect review comments.

Change-Id: I1ba4f2b017bf8b60a9c382260131d23c734001b2
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17871
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoFix to prevent of crash on the unit test.
KIM JungYong [Tue, 21 Mar 2017 10:00:43 +0000 (19:00 +0900)]
Fix to prevent of crash on the unit test.

As-Is, Notification unit test sometimes crash on running.

Cause by,
1) When provider unit test running,
it use invalid request information.
this invalid request is not made by stack,
made by inside unit test as uninitialized variables.

2) When consumer was destroyed, task queue was deinitilzed.
but main task thread waitting for mutex unlocking,
when mutex unlock, main thread does not update address of queue.
actually, address of queue is modified,
in this moment, main thread try to reference unmodified queue and crash.

Fixed,
1) Uninitialized variables are initialized.
2) When main thread mutex was unlocked, updating queue.
   Exception handling what data of queue is invalid.

Change-Id: I41cd4a100ea2bb7b3e68be3017475c9ecbfbb144
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18047
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoPSK check before ciphersuite selection
Andrii Shtompel [Wed, 25 Jan 2017 14:16:03 +0000 (16:16 +0200)]
PSK check before ciphersuite selection

Checking identity added to avoid including PSK suite
if no appropriate PSK in SVR DB.

Change-Id: I118c4b5864929cc8fdd0597af855f3c06b9332dc
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16731
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoMerge branch 'master' into cloud-interface
Jee Hyeok Kim [Mon, 3 Apr 2017 04:20:22 +0000 (13:20 +0900)]
Merge branch 'master' into cloud-interface

Change-Id: I90cc0049c72082a1ce630e9c7bade9d67e1afd0f
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
7 years agoMerge "[IOT-1785] Merge branch 'iot-1785'"
Greg Zaverucha [Mon, 3 Apr 2017 21:00:53 +0000 (21:00 +0000)]
Merge "[IOT-1785] Merge branch 'iot-1785'"