platform/upstream/iotivity.git
7 years ago[IOT-1942] Add support for diagnostic payloads.
Todd Malsbary [Tue, 11 Apr 2017 18:42:10 +0000 (11:42 -0700)]
[IOT-1942] Add support for diagnostic payloads.

Bug: https://jira.iotivity.org/browse/IOT-1942
Change-Id: Ia4d761bfc49d646b2e1514844826411df272d5a4
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18721
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-2057] Tizen enrollee sample app fix.
Senthil Kumar G S [Tue, 18 Apr 2017 12:17:19 +0000 (17:47 +0530)]
[IOT-2057] Tizen enrollee sample app fix.

Change-Id: Ie22a8c4564acf32dbc6096c7aaeb35f2f7bccd63
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19057
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoEnable scene manager unit test on build time.
KIM JungYong [Tue, 18 Apr 2017 05:44:32 +0000 (14:44 +0900)]
Enable scene manager unit test on build time.

Scene manager unit test was blocked before,
in this patch, scene manager unit test was enabled on build time.

Change-Id: I239209f1154f08caab1088ccf3b23c2b5e0ba732
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19041
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoSupport secure network info in CAGetNetworkInformation
hyuna0213.jo [Tue, 18 Apr 2017 09:34:57 +0000 (18:34 +0900)]
Support secure network info in CAGetNetworkInformation

Secured network interface information should be provided

Change-Id: I2fd73fa23759d27e694d81d208aca451cd989fc6
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18969
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 852a9136741d22948b05146db93c30ba7ec6f98c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/19051
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-1952] Assert roles automatically
Greg Zaverucha [Wed, 5 Apr 2017 19:05:06 +0000 (12:05 -0700)]
[IOT-1952] Assert roles automatically

- Change OCDoRequest to assert role certificates before the first
secure request to a server.

- Move role assertion code out of provisioning to security, so that
ocstack can call it without including all provisioning code. Create
a public API for asserting role certificates OCAssertRoles. Role
assertion code is in new files ocsecurity.c/h

- Revise scenario tests accordingly.

Other changes in this commit:
- Rename a macro "OPTIONAL" in cloud samples since this is defined
in a standard Windows header and causing a build break.

- Fix the --onetest command line option to provisioningTest.py

Change-Id: I915d321bfff0bfd00add3298b07865b0963d9f14
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18833
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoextlibs: Use patch as fallback and trap errors
Philippe Coval [Wed, 22 Mar 2017 08:27:25 +0000 (09:27 +0100)]
extlibs: Use patch 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>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18661
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agotizen: Enable BT for Tizen:2.4 by default
Philippe Coval [Wed, 12 Apr 2017 07:42:50 +0000 (16:42 +0900)]
tizen: Enable BT for Tizen:2.4 by default

It was reported that BT got disabled for Tizen:2.4,
after investigation it appeared that Tizen:2.4 is defined as tizen=2.3
https://build.tizen.org/project/show?project=Tizen%3A2.4%3AMobile

So instead BT is disabled for Tizen:2.2 (defined as tizen=2.1)
https://build.tizen.org/project/prjconf?project=Tizen%3A2.2%3ABase

Bug: https://jira.iotivity.org/browse/IOT-2030
Change-Id: I0ebd08f383c396d913cdbd89801131b544534d23
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18811
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
7 years agoFix build fail on notification with MQ.
KIM JungYong [Tue, 18 Apr 2017 03:59:27 +0000 (12:59 +0900)]
Fix build fail on notification with MQ.

When building of notificaiton with MQ, build failed
because related API call invalid(removed) function.

in this patch, removed function was changed.

Change-Id: Ib97a5c966f4bd8907bfecbfd1463340574c2063c
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19031
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agoUpdate tizen build for multiple ownership
m.parves [Sun, 9 Apr 2017 01:02:26 +0000 (07:02 +0600)]
Update tizen build for multiple ownership

1. Add parameter for multiple owner in iotivity.spec
2. Pass this parameter value to scons from spec

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

Change-Id: Idc39544911674ace14fd5ec8169413cd517a14e9
Signed-off-by: m.parves <m.parves@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18683
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2011] linker changes for oc_logger
Dan Mihai [Fri, 7 Apr 2017 20:29:14 +0000 (13:29 -0700)]
[IOT-2011] linker changes for oc_logger

Windows currently has several different copies of oc_logger code and
data in a single process. Other platforms are using a single copy of
shared library oc_logger, in each process/app.

It's better to avoid differences across platforms, because otherwise
changes tested on one platform might not work on the other platforms.

Linker behavior unchanged by this patch:
----------------------------------------

1. On non-Windows platforms: IoTivity sample apps, and apps outside
   IoTivity, link with oc_logger.

2. On Windows: IoTivity sample apps, and apps outside IoTivity,
   continue to link with octbstack.lib.

Linker behavior changed by this patch:
----------------------------------------

1. On all platforms: IoTivity internal tests link with the static LIB
   oc_logger_internal.

2. On Windows: IoTivity sample apps, and apps outside IoTivity,
   no longer link directly with oc_logger.lib. They obtain access to
   oc_logger APIs by linking with octbstack.lib.

3. On Windows: Octbstack.dll links with the static LIB
   oc_logger_internal, and exports public oc_logger APIs.

Change-Id: I3ca36ffcbebea7822918998ac3fced1c5071726e
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18769
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[IOT-2013] Windows: export C RD APIs from octbstack.dll
Dan Mihai [Mon, 10 Apr 2017 23:57:41 +0000 (16:57 -0700)]
[IOT-2013] Windows: export C RD APIs from octbstack.dll

Windows currently has several different copies of the implementation
for these APIs. Other platforms are using a single copy of shared
library resource_directory, in each process/app.

It's better to avoid differences across platforms, because otherwise
changes tested on one platform might not work on the other platforms.

Note that the C++ APIs for resource_directory clients remain inside
the static resource_directory.lib, so there can be multiple copies of
the C++ API implementation in each Windows process.

Change-Id: I07683359c265989d9921cd28da6ccd83d30f06af
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18775
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[IOT-1986] Windows: Workaround race condition linking with oc_logger.lib
Soemin Tjong [Thu, 13 Apr 2017 19:23:08 +0000 (12:23 -0700)]
[IOT-1986] Windows: Workaround race condition linking with oc_logger.lib

Temporary solution for similar issue as described in:
https://gerrit.iotivity.org/gerrit/#/c/18767/

Change-Id: Ib02c0e77b3700aed89111ce95e131db121e7acdd
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18937
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoFix a defect detected by static code analyzer.
Jaehong Jo [Fri, 14 Apr 2017 02:06:03 +0000 (11:06 +0900)]
Fix a defect detected by static code analyzer.

Add null check and remove strcpy in
oic_malloc_tests.cpp, ocstack.c, oickeepalive.c

Change-Id: I7303374ce2ff6ee68ab01e844dbef4dd46a4cf1a
Signed-off-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18953
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix a defect detected by static code analyzer
Jaewook Jung [Fri, 14 Apr 2017 02:34:00 +0000 (11:34 +0900)]
Fix a defect detected by static code analyzer

Because the size of the struct CAEndpoint_t is 184 bytes,
it is better to pass a pointer of it if call-by-value is not
necessary.

Change-Id: I680cb11ba6ad18613370a76333002d7784a23178
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18955
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: jaehyun Cho <jaehyun3.cho@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix a defect detected by static code analyzer
Jaewook Jung [Thu, 13 Apr 2017 05:55:15 +0000 (14:55 +0900)]
Fix a defect detected by static code analyzer

unsigned int is always greater than or equal to zero.

Change-Id: I2aa83c4a224e5bbaf22882ccb131161850dcee57
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18879
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agotizen: Use octimer from common lib
Philippe Coval [Wed, 12 Apr 2017 07:44:54 +0000 (16:44 +0900)]
tizen: Use octimer from common lib

Change-Id: I09c24097a319dd390d6cc99488cd88c603acc21c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18887
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years agoFix for double free in RE cache unit test.
KIM JungYong [Thu, 13 Apr 2017 07:05:28 +0000 (16:05 +0900)]
Fix for double free in RE cache unit test.

[Problem]
When RE cache unit test is terminated,
always will crash af double free.

[Reason]
double freed valiable is shared pointer of mock object.
this pointer will remove twice on release of mock object and shared pointer.

[Fix]
Deleter as non-operation was added on the creation of shared pointer.

Change-Id: I6434795fd011312b1a9bcb5ecf0d092aab19b487
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18893
Reviewed-by: Jay Sharma <jay.sharma@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove some properties in oic.r.devconf resource
Jihun Ha [Wed, 12 Apr 2017 10:49:52 +0000 (19:49 +0900)]
Remove some properties in oic.r.devconf resource

Problem:
 Some of properties in oic.r.devconf resource has a duplicated meaning with
other existing resource's one like oic.wk.con and oic.wk.p. For OCF spec,
such a duplication should be avoided as possible.

Way to resolve:
All properties EXCEPT device name("dn") property are removed.
Later, some properties can be defined in oic.r.devconf with spec update.

Change-Id: I935b3d46773aa97a846335ad36f4f866269e05d0
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18793
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agofix unsafe functions(strcpy, sprintf)
bg.chun [Fri, 14 Apr 2017 04:11:54 +0000 (13:11 +0900)]
fix unsafe functions(strcpy, sprintf)

fix strcpy -> strncpy
fix sprinrf -> snprintf

Change-Id: Ic228e3735fe3b329ec3116a393406892d0f127e2
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18961
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoRemove unused dependencies to RD LIB
Dan Mihai [Mon, 10 Apr 2017 15:02:30 +0000 (08:02 -0700)]
Remove unused dependencies to RD LIB

Change-Id: Id40c4b20433ad5e514657495ffac17fee6df61db
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18773
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years ago[IOT-2035] Build jni code before samples
George Nash [Thu, 13 Apr 2017 22:11:42 +0000 (15:11 -0700)]
[IOT-2035] Build jni code before samples

Changed tabs to spaces to match with conventions
used elsewhere.

Change-Id: Ic5cfb104b0dd224d8bb88118f66d5ea1370ab2ad
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18941
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
7 years ago[IOT-2034] Updating Enrollee sample app for Tizen
Jay Sharma [Thu, 13 Apr 2017 14:09:57 +0000 (19:39 +0530)]
[IOT-2034] Updating Enrollee sample app for Tizen

Change-Id: I06468c436db5a883f747772841413a1afef9d23a
Signed-off-by: Harish Kumar Marappa <h.marappa@samsung.com>
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18921
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agoFix for JIRA IOT-2044.
Senthil Kumar G S [Thu, 13 Apr 2017 15:00:51 +0000 (20:30 +0530)]
Fix for JIRA IOT-2044.

Handled "GetStringUTFChars received NULL jstring" error

Change-Id: I67aecab98e496ec715e634246d4ee32efc44aa8b
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18927
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years agotizen: Set parallelize build up to (nproc / 2)
Philippe Coval [Wed, 12 Apr 2017 23:05:21 +0000 (08:05 +0900)]
tizen: Set parallelize build up to (nproc / 2)

Some systems faced internal compiler errors when overloaded

Bug: https://jira.iotivity.org/browse/IOT-2026
Change-Id: I898a76d894ec63a7945ec3ea668a0095b7fb2468
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18905
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2008] Wrapping OCGetLinkLocalZoneId by ifdef IP_ADAPTER
bg.chun [Fri, 7 Apr 2017 02:25:33 +0000 (11:25 +0900)]
[IOT-2008] Wrapping OCGetLinkLocalZoneId by ifdef IP_ADAPTER

Wrapping OCGetLinkLocalZoneId by ifdef IP_ADAPTER
because real implementation located on ca ipadapter.
It makes BLE only stack build fail.

Change-Id: Ifd2ccaa0ba3ea62967186a69c670694f2b5d5d81
Signed-off-by: bg.chun <bg.chun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18965
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[RI] Tizen Csdk sample build fix for 32 bit machine
Veeraj Khokale [Thu, 13 Apr 2017 10:50:05 +0000 (16:20 +0530)]
[RI] Tizen Csdk sample build fix for 32 bit machine

Tizen Csdk sample build fix for 32 bit machine

Change-Id: I73a1a6866a17bb1eff7f797e6dd361a2b9bfd583
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18915
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 agoFix a sconscript for enrollee unit test
Jihun Ha [Thu, 13 Apr 2017 11:03:47 +0000 (20:03 +0900)]
Fix a sconscript for enrollee unit test

Add a line for enabling unittest for enrollee

Change-Id: Ia1e88d4a17f0a69d09cf65da8368b5af24c1686f
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18695
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2016][IOT-1623] UUID check and use MBEDTLS_MD_MAX_SIZE
Greg Zaverucha [Mon, 10 Apr 2017 20:05:24 +0000 (13:05 -0700)]
[IOT-2016][IOT-1623] UUID check and use MBEDTLS_MD_MAX_SIZE

Use MBEDTLS_MD_MAX_SIZE for buffer lengths in pHash.
Don't allow wildcard UUID in CSRs

Change-Id: Ifad48945250087d8dc92fb346cfc986f68888352
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18829
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years ago[IOT-2037] Resolved android crash
Randeep Singh [Thu, 13 Apr 2017 08:43:33 +0000 (14:13 +0530)]
[IOT-2037] Resolved android crash

Change-Id: I9c54cc3fea321ad2f5b657eb0784ef707070dace
Signed-off-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18895
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2034] Fix for Tizen Enrollee sample build issue.
Jay Sharma [Thu, 13 Apr 2017 14:59:43 +0000 (20:29 +0530)]
[IOT-2034] Fix for Tizen Enrollee sample build issue.

Change-Id: I40f6e2ee5ffa91fdc4b746a94ecd35d07e5fa6d9
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Signed-off-by: Harish Kumar Marappa <h.marappa@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18925
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years ago[IOT-2033] Update simple base app to enable BLE Advertisement by default.
jihwan.seo [Thu, 13 Apr 2017 10:20:56 +0000 (19:20 +0900)]
[IOT-2033] Update simple base app to enable BLE Advertisement by default.

Change-Id: I382ecdbd7cdcc2f60da3e5f6389c786f8d6ebc9f
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18909
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.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>
(cherry picked from commit fb7c36315b96a1bb8cd2f1fe03c6c66ee0b89eac)
Reviewed-on: https://gerrit.iotivity.org/gerrit/18825

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 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 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 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 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 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'"

7 years agobuild: Download gtest 1.7.0 from upstream source
Philippe Coval [Thu, 23 Mar 2017 09:58:37 +0000 (10:58 +0100)]
build: Download gtest 1.7.0 from upstream source

Fedora mirror was used before, as fallback to googlecode repo.
Then upstream relocated to github, and changed (its tarball form),
so it was changed in iotivity's Sconscripts,
but not in that prep.sh scriptlet.

Now everything is aligned to upstream,
and will not be downloaded twice in different forms
(2d one is scons' puller).

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I0778499e96121124df0da536623155d9b049bb2f
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18127
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFix huge amount of warnings generated by logs
Andrii Shtompel [Thu, 30 Mar 2017 13:06:09 +0000 (16:06 +0300)]
Fix huge amount of warnings generated by logs

Next warning generated by each call OIC_LOG/OIC_LOG_V were removed:
warning: comparison of unsigned expression >= 0 is always true

Change-Id: Ic2c4b8ba0e032255086a0ec6a0c3d3b4d643ae79
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18373
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agotinycbor: Update import to v0.4.1
Philippe Coval [Wed, 29 Mar 2017 16:34:05 +0000 (18:34 +0200)]
tinycbor: Update import to v0.4.1

git "module" was converted to patch this way:

url=https://github.com/01org/tinycbor.git
tag=v0.4.1

git clone  -b $tag  extlibs/tinycbor/tinycbor
rm -rf extlibs/tinycbor/tinycbor/.git
git add -f  extlibs/tinycbor/tinycbor/
git commit -sm "tinycbor: Update import to $tag" extlibs/tinycbor/tinycbor/

Change-Id: I5365b1025b55091f371c4c7d8500b8e9b18f478c
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18345
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agostack: Flag OCAdapterStateChangedHandler unused parameter
Philippe Coval [Wed, 29 Mar 2017 14:09:43 +0000 (16:09 +0200)]
stack: Flag OCAdapterStateChangedHandler unused parameter

Change-Id: I5e5c3c288311fc97ee7ea4014228f9d80fef71d6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18337
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoresource: Flag OCRepresentation unused parameters
Philippe Coval [Fri, 24 Mar 2017 01:56:14 +0000 (02:56 +0100)]
resource: Flag OCRepresentation unused parameters

Change-Id: I13da089d0fe2b1fcedc2d4b0c8f3e82e07ff74d6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18165
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoRemove incorrect semicolons at end of for loop.
Soemin Tjong [Wed, 29 Mar 2017 23:19:47 +0000 (16:19 -0700)]
Remove incorrect semicolons at end of for loop.

This causes problem establishing all TCP connections to servers.

Change-Id: Icaa4071a27a84b156d2eeea508b70a64a45a649d
Signed-off-by: Soemin Tjong <stjong@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18353
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Omar Maabreh <omarm@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
7 years agoRevert "Change default vaule of acceptVersion and acceptFormat.". This change has...
Ziran Sun [Mon, 3 Apr 2017 12:55:09 +0000 (12:55 +0000)]
Revert "Change default vaule of acceptVersion and acceptFormat.". This change has broke device discovery in provisioning (See IOT-1987)

This reverts commit feba13f7d0d8a4226e526c092eb050855c2caee8.

Change-Id: I64ff4508bb4583f70f5e6b3d88519b6ba8460e9d
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18455
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
7 years agoAdd missing null checks [IOT-1190]
veeraj.sk [Tue, 21 Mar 2017 10:13:17 +0000 (15:43 +0530)]
Add missing null checks [IOT-1190]

Add missing null checks after calling OICMalloc and
OICStrdup in bt_le_adapter/linux/client.c, caradapter.c
and ocpayload.c.

Change-Id: I57c82caa0dea117b19b548562fa27bad0b2f3ec6
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18051
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-1944] If handshake fails, mbedtls alert sent twice
Andrii Shtompel [Wed, 29 Mar 2017 18:26:17 +0000 (21:26 +0300)]
[IOT-1944] If handshake fails, mbedtls alert sent twice

Change-Id: I5d71be0f7f0fe2e499bd1940083db6cb84e0df75
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18349
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoeasy-setup: Fix Initialization warning (var is char not string)
Philippe Coval [Wed, 29 Mar 2017 07:59:28 +0000 (09:59 +0200)]
easy-setup: Fix Initialization warning (var is char not string)

Observed issue was:

  service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c:262:19: \
  warning: initialization makes integer from pointer without a cast [enabled by default]
  char option = "";

Change-Id: Ib86e46094dee109a82cd483669480dbe97e8c570
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18329
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
7 years agobuild: take compiler options from environment
Hauke Mehrtens [Sat, 10 Dec 2016 17:08:05 +0000 (18:08 +0100)]
build: take compiler options from environment

This makes it possible to compile IoTivity with custom compiler
options. This way someone can use optimized compiler settings for the
target CPU. I want to use this in OpenWrt / LEDE to build specific
IoTivity binaries for each CPU architecture, there the build system
provides the matching compiler options.

Change-Id: I86772f73b81c41d7e96e51b434fd9e3b4992753a
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15435
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years agoWindows: remove cbor exports
Dan Mihai [Fri, 31 Mar 2017 21:30:39 +0000 (14:30 -0700)]
Windows: remove cbor exports

Security sample apps used to need them, but not anymore.

Change-Id: If196e429e2e70ab4f21039faf69774686bc98318
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18417
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
7 years ago[IOT-1785] Merge branch 'iot-1785'
Kevin Kane [Fri, 31 Mar 2017 19:59:42 +0000 (12:59 -0700)]
[IOT-1785] Merge branch 'iot-1785'

Change-Id: I9f8270ab9643dcf203b9fbcd20a37ee482659e16
Signed-off-by: Kevin Kane <kkane@microsoft.com>
7 years agoMerge branch 'master' into iot-1785
Kevin Kane [Fri, 31 Mar 2017 19:41:13 +0000 (12:41 -0700)]
Merge branch 'master' into iot-1785

Conflicts:

    resource\csdk\security\include\internal\acl_logging.h
    resource\csdk\security\src\aclresource.c

Change-Id: Ide5322ac5c02c82af08586c4dc2fb2ec80b1b301
Signed-off-by: Kevin Kane <kkane@microsoft.com>
7 years agoCreate PSKs with the correct encoding type
Kevin Kane [Thu, 30 Mar 2017 22:33:16 +0000 (15:33 -0700)]
Create PSKs with the correct encoding type

Encoding/decoding code that currently ignores the value of this
field, but this will change when certificates and role features
are merged in.

Change-Id: Idf8d2b1ffd95d2e517e4da7c76ce767a57ce428d
Signed-off-by: Kevin Kane <kkane@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18407
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years agoIOT-1583: Removing boost usage from stack sample.
Pawel Winogrodzki [Wed, 29 Mar 2017 01:00:30 +0000 (18:00 -0700)]
IOT-1583: Removing boost usage from stack sample.

There is no need to have an additional dependency on boost
for the sake of this sample.

Change-Id: I4bc65730aebb62f5b3d0e9edc0ff9ff8ae16a7e2
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18307
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mike Fenelon <mike.fenelon@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoFixed memory leak detected by valgrind
Jaewook Jung [Tue, 28 Mar 2017 00:04:26 +0000 (09:04 +0900)]
Fixed memory leak detected by valgrind

Fixed memory leak detected by valgrind

Change-Id: I96c4d0816ea5be4a90e20af59e64ea3aec454c27
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18227
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years ago[IOT-1785] Finish role certs feature
Greg Zaverucha [Tue, 28 Mar 2017 23:23:39 +0000 (16:23 -0700)]
[IOT-1785] Finish role certs feature

Add end-to-end testing of role certificate scenario:
- provision role certs
- test role-based ACLs provisioning and enforcement
- test assertion of role certificates

Fix bugs and add new functions as necessary. Added the ROLE_CERT
usage to distinguish role certs (which can't be used for TLS)
from identity certs. Previously they were both saved as PRIMARY_CERT.
Some small changes to save and retrieve role certificates locally. Add
functionality to assert roles (POST the certs to /oic/sec/roles).

Change-Id: I9080e0ca6b0809608621eb8b23dd4bbbfbbb176c
Signed-off-by: Greg Zaverucha <gregz@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18219
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
7 years agoFix defect detected by static code analyzer
YunheeHwang [Wed, 29 Mar 2017 09:45:47 +0000 (18:45 +0900)]
Fix defect detected by static code analyzer

Problem : Dynamic memory referenced by (*set)->actionsetName was allocated by calling malloc and lost without free before exit
Resolve : add OCFREE((*set)->actionsetName) before OCFREE(*set)

Problem : Dynamic memory referenced by payload was allocated by calling function 'OCRepPayloadCreate' and lost without free before exit
Resolve : add OCRepPayloadDestroy(payload) to free them

Change-Id: I2f8bbbd009c567cda8c091ffde925f1692416c9b
Signed-off-by: YunheeHwang <yunhee.hwang@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18259
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
7 years agoChange default vaule of acceptVersion and acceptFormat.
Ziran Sun [Tue, 28 Mar 2017 14:48:07 +0000 (15:48 +0100)]
Change default vaule of acceptVersion and acceptFormat.

Change the value that was for OIC 1.1 to OCF 1.0.0.

Bug: https://jira.iotivity.org/browse/IOT-1959
Change-Id: Iac714ab5bc410c09f5ca4e20071b9749ce405340
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18263
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
7 years ago[IOT-1792] rectified bad check issue in pstatresource
saurabh.s9 [Wed, 29 Mar 2017 04:46:18 +0000 (10:16 +0530)]
[IOT-1792] rectified bad check issue in pstatresource

Change-Id: Id8dbb670961d1efc40114f9de757cd31b296c2d4
Signed-off-by: saurabh.s9 <saurabh.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18311
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years agoVersion option is not associate with application/cbor format.
Ziran Sun [Fri, 24 Mar 2017 15:24:56 +0000 (15:24 +0000)]
Version option is not associate with application/cbor format.

    1. Remove versioing option settings for application/cbor format.
    2. Correct default versioing number value.

Change-Id: Ia9a5f1edfc834a450106eefc4097c60726e4d740
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18167
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>