platform/upstream/iotivity.git
6 years agoFix memory access error
Mats Wichmann [Tue, 15 Aug 2017 14:44:26 +0000 (08:44 -0600)]
Fix memory access error

off-by-one in allocating memory for a string: was no space
for the null terminator since strlen() was used to compute size.

Change-Id: Ic7b836416f2a5319f2906be504fec09de29182dc
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21917
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2631] Increase message buffer size
Alex Kelley [Fri, 1 Sep 2017 00:24:36 +0000 (17:24 -0700)]
[IOT-2631] Increase message buffer size

Increase the size of the receive message buffer in CAReceiveMessage.

Change-Id: I4793631d88a99bb1e60c6a286b0edfcc2b2be837
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22291
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Steven Saunders <s.saunders-contractor@cablelabs.com>
Reviewed-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2653] Update sample .dat and .json files
Oleksii Beketov [Tue, 5 Sep 2017 12:37:03 +0000 (15:37 +0300)]
[IOT-2653] Update sample .dat and .json files

1. oic_svr_db_client.dat and oic_svr_db_server_mfg.dat
   corrupted certificates fixed
2. changed mfgcert cred field type from optionaldata to
   publicdata to meet changes provided with #21929
3. json files changed to unix format

Change-Id: Id08d7b426d28bae2ffebc89e8861f73181e0cdb0
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22257
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agobuild: prevent unused-parameter warning
George Nash [Thu, 13 Jul 2017 19:44:40 +0000 (12:44 -0700)]
build: prevent unused-parameter warning

the connectivity bt_le_adapter has auto generates files
  - bluez-glue.c
  - object_manager-glue.c

The files are included when building the connectivity_abstraction
library. This error is only disabled when bt_le_adapter is being
built. We don't want to hide the unused-parameter warning. This
is the simplest way to hide the warning without large changes
in the build.

Change-Id: Ieca1412ab744b7fccf408a80f66ef0add1a91fa6
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21429
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit e7ea0fdccf6187a19abfb3f7ac650d8852437d13)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22217
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
6 years agoIOT-2539 fix int-conversion warning
George Nash [Wed, 2 Aug 2017 23:17:56 +0000 (16:17 -0700)]
IOT-2539 fix int-conversion warning

On linux pthread_t is not a pointer type so
assigning it as NULL is an error. pthread_t should be
assigned using the functions like pthread_create which
is already done.

Change-Id: I55559a3ed3d4de82dd4863b1ee6e0ce11dd1726b
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21739
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
(cherry picked from commit 2dc503e6569871651fe19f430bfd59a301102dc6)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22185

6 years agotizen: Add support for Tizen:4:Unified (armv7l)
Philippe Coval [Wed, 19 Jul 2017 13:05:48 +0000 (15:05 +0200)]
tizen: Add support for Tizen:4:Unified (armv7l)

To use for ARM:
gbsarch=armv7l gbsprofile=tizen_4_0_unified_armv7l ./gbsbuild.sh

Other arch might come later, if needed.

Change-Id: I81414e75c7d52f8f00d8cdaa8ca6e9a2ab60d2a3
Bug: https://jira.iotivity.org/browse/IOT-2397
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21617
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit 387bd249a0537e6a39d8cfb59dd3bd7a186cf7d2)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22289

6 years agoAdd getServerHeaderOption API in OCResource.
Ziran Sun [Fri, 1 Sep 2017 10:35:57 +0000 (11:35 +0100)]
Add getServerHeaderOption API in OCResource.

Client requests to accessing headoptions, especially for
server version information. This patch adds a new API in
OCResource to access header Options from server response.

BUG: https://jira.iotivity.org/browse/IOT-2667
Change-Id: Ie18d3396666f778e0758ef0e4609274e53226cf1
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22299
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
6 years agoAccessing server version info at client callback.
Ziran Sun [Thu, 3 Aug 2017 15:47:06 +0000 (16:47 +0100)]
Accessing server version info at client callback.

Change-Id: I526a15ce50599782d45f8b0e50b5c4ae2d292b88
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21743
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
6 years ago[IOT-2658][IOT-2443] fix unowned discovery fail
uzchoi [Fri, 1 Sep 2017 04:07:16 +0000 (13:07 +0900)]
[IOT-2658][IOT-2443] fix unowned discovery fail

During the merge https://gerrit.iotivity.org/gerrit/#/c/21371/,
existing code was excluded for unowned device discovery on secured
build. This fix adds the original fix into the appropriate position.
This issue is also in https://jira.iotivity.org/browse/IOT-2658

Change-Id: I189e4e420bbafff01710a11d298bee61c23cef03
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22293
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
6 years ago[IOT-2617] Enable JW OTM without Update to oxmsel.
Nathan Heldt-Sheller [Tue, 22 Aug 2017 22:36:33 +0000 (15:36 -0700)]
[IOT-2617] Enable JW OTM without Update to oxmsel.

With this change, IoTivity will enable the Anon DH suite, and register
the handshake callback, at Init() time (if selected in /doxm), rather
than requiring an Update to /doxm.oxmsel to do so.

Change-Id: I7e2985fdb1ed8328a1293aaaafe010bdcd3e975a
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22025
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2387][IOT-2479] Fix RESET behavior
Nathan Heldt-Sheller [Tue, 15 Aug 2017 08:02:28 +0000 (01:02 -0700)]
[IOT-2387][IOT-2479] Fix RESET behavior

This fixes the Device Onboarding State logic, but still omits the
ResetSecureResources() call because it's causing a crash.

That issue is being tracked separately in IOT-2633, and can
be fixed in a separate patch.

Change-Id: Iebeafc1cfb34a9c009ec4d59e4c74838838c950d
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21913
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2444] Add constant for MAX_SEQUENCE_NUMBER
Larry Sachs [Mon, 28 Aug 2017 20:25:50 +0000 (13:25 -0700)]
[IOT-2444] Add constant for MAX_SEQUENCE_NUMBER

Added a constant for MAX_SEQUENCE_NUMBER and updated
sample client apps to use the value when checking for
deregister completion.

Change-Id: Ie24c6ce33f10291fe45e2ca8eda27c997dd332a6
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22175
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ondrej Tomcik <ondrej.tomcik@kistler.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
6 years ago[Bug2615] Remove di from GET /oic/rd
Habib Virji [Thu, 17 Aug 2017 18:49:01 +0000 (19:49 +0100)]
[Bug2615] Remove di from GET /oic/rd

di property to remove GET /oic/rd

Change-Id: I659fe1fbff8c38e453bdf98605d8765c1fffaf00
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21981
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
6 years agoIOT-2539 Cleanup warnings from subownerclient.cpp
George Nash [Fri, 4 Aug 2017 21:01:52 +0000 (14:01 -0700)]
IOT-2539 Cleanup  warnings from subownerclient.cpp

Used the OC_UNUSED macro for unused parameters in callback
functions.

Deleted unused variables.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I5b1ad8bb52622217fc3a4ab11ff18b3e8f1376d9
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21757
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 7d7389be01703751816bc0b21f21ac6bd18fc711)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22177

6 years agoFix darwin SDK detection logic (IOT-1862)
Mats Wichmann [Sat, 4 Mar 2017 15:06:34 +0000 (08:06 -0700)]
Fix darwin SDK detection logic (IOT-1862)

Also a small refactor in the ios sconscript

The logic parses text from querying xcodebuild to find the latest sdk
version supported by the host, but it seems the content of this text has
changed over time, so we have to recognize a couple of tags for the Mac.

The original version had a flaw: the script can be called with
SYS_VERSION set to indicate a minimum version, but then it checks if an
SDK path with that version is installed, which might not be the case.
e.g.: SYS_VERSION=10.10, but the only installed SDK is for 10.12.
Calling with "-mmacosx-version-min=10.10" is fine, but checking if
.../Platforms/MacOSX.platform/Developer/SDKS/MacOSX/x86_64/10.10 exists
as a condition is not.  This has been adjusted by checking if a requested
version exists in the list of detected versions, and bumping the requested
version up to a found one, unless the found ones are actually lowere
than the requested.  It still seems awfully convoluted, but at least
works now on a 10.12 system without breaking the build in use for
IoTivity Jenkins.

Change-Id: I0e19893de52393789d23dcecc8d167d2236d4674
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21475
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
6 years agoRemove RT in RD publish unittest.
Ziran Sun [Fri, 25 Aug 2017 09:01:48 +0000 (10:01 +0100)]
Remove RT in RD publish unittest.

Remove rt referece of oic.wk.rdpub in RD unitests to be inline with spec.

Change-Id: I0ed49dcca1634617fd4b21280c7a7e14833989ca
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22131
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
6 years ago[IOT-2430] Change OCLinksPayloadValueCreate API
uzchoi [Sun, 30 Jul 2017 08:32:56 +0000 (17:32 +0900)]
[IOT-2430] Change OCLinksPayloadValueCreate API

OCLinksPayloadiValue returned PayloadValue which requies memory
release when we only takes array member as property of payload.
Instead of PayloadValue, PayloadArray is returned from this API.
Considering the CPP API, this return type will work better.
API name has been changed into OCLinksPayloadArrayCreate also.

According to the API change, code used this API also changed
excluding redundant memory allocation.

Previously result is passed by parameter as pointer with bool
return, but result is passsed as return value to align the style
of other IoTivity Create type APIs.

Change-Id: I4ed976f29cef8105ac002021d970ef61d00ae7cd
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21673
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
6 years agoImprove android building
Mats Wichmann [Mon, 10 Jul 2017 13:38:27 +0000 (07:38 -0600)]
Improve android building

build_common/SConscript:
    - ANDROID_NDK, ANDROID_HOME, ANDROID_GRADLE option variables
    setup moved to end.  A visit if needed to respective SConscripts
    will cause the default path to be computed, this path is
    then supplied to the variable setup.  The comment in the later
    section will describe more.
build_common/android/SConscript:
    - option var setup not heeded here. Just call ndk, gradle, sdk
    SConscript if path not already set.
    - API_VER is set at top, idea is to have one place to change
    to experiment with new verisons.
    - all three paths are printed from one "print", this can easily
    be disabled if not wanted.
build_common/linux/SConscript,
build_common/windows/SConscript:
    - just pick up gradle info from SConscript, no need for the
    option var setup.
extlibs/android/gradle/SConscript:
    - clean up; version is now set in a single variable
extlibs/android/ndk/SConscript:
    - clean up; version is now set in a single variable
    - adds Mac support - untested, but why not: sdk script does it
extlibs/android/sdk/SConscript:
    - clean up; version is now set in a single variable

Change-Id: I7e4355493808eddce6899fe657657e56c339ae5d
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21631
Reviewed-by: George Nash <george.nash@intel.com>
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>
6 years ago[IOT-1925] ACE provisioning should fail
akk0rd [Fri, 11 Aug 2017 17:52:59 +0000 (20:52 +0300)]
[IOT-1925] ACE provisioning should fail

ACE provisioning should fail if interface length is 0

Change-Id: Ibe09302d6769eff90403fd130b5f88195ac32cac
Signed-off-by: akk0rd <v.riznyk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21895
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoraxmpp: Add scriptlet to clone before scons
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
raxmpp: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Ibb074c1387826af783c2a8d18c3f12bfc34834c3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21535
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 90cde5ba9927d19d0c1826500f3ada41e2693d2f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22157
Reviewed-by: Mats Wichmann <mats@linux.com>
6 years agoyaml: Add scriptlet to clone before scons
Philippe Coval [Tue, 25 Jul 2017 16:13:18 +0000 (18:13 +0200)]
yaml: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Ief605d40b83d437df4049d18af7188eaea0ecbcb
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21623
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 286bc151acf0e8f2b67932d0fca2405cc859375e)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22079
Reviewed-by: Mats Wichmann <mats@linux.com>
6 years agolibstrophe: Add scriptlet to clone before scons
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
libstrophe: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Iac4a2df91c81bc65af6742378bda2b67e66dc0cf
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21531
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit e1ad56040295161e2c21e48f8326631e4492e084)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22085
Reviewed-by: Mats Wichmann <mats@linux.com>
6 years agosecurity: Fix warnings in srmtestcommon
George Nash [Tue, 23 May 2017 21:41:54 +0000 (14:41 -0700)]
security: Fix warnings in srmtestcommon

Fixed missing-field-initializers compiler warnings from srmtestcommon

This initializes all of the fields in the CborValue and CborParser
structs.

Change-Id: I8bc6ec584cd94d9882fed0cc30cd4a2892b4ade3
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20339
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
(cherry picked from commit e1fb8f8e906e99db480259b16dbe2fe41cbb04f6)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21827
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoFix trivial gtest info error
Mats Wichmann [Tue, 29 Aug 2017 13:47:21 +0000 (07:47 -0600)]
Fix trivial gtest info error

Missing % sign to interpolate GTEST_VERSION into output message

Change-Id: I159e7cb43afe7614ac85fb99686920f075b79d6a
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22227
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years agoeasy-setup: Removing redundant env configuration
Pawel Winogrodzki [Thu, 6 Jul 2017 23:31:48 +0000 (16:31 -0700)]
easy-setup: Removing redundant env configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/easy-setup/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I76cf82bacb36d95574f5d716c01cd1d7fb7e4f5f
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21325
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years ago[IOT-2639] pstat.tm doesn't saved
Aleksey Volkov [Thu, 24 Aug 2017 05:35:56 +0000 (08:35 +0300)]
[IOT-2639] pstat.tm doesn't saved

Change-Id: I175349cfe008d8544a35e15a98d7d401de9d064c
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22041
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2338] Update unittest json to use acl2
Aleksey Volkov [Thu, 24 Aug 2017 04:15:52 +0000 (07:15 +0300)]
[IOT-2338] Update unittest json to use acl2

Change-Id: I7e3f9a71c962ec7b5971b24988bf01961149f4bb
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22039
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2642] DELETE /roles succeeds if no entry
Nathan Heldt-Sheller [Thu, 24 Aug 2017 16:35:18 +0000 (09:35 -0700)]
[IOT-2642] DELETE /roles succeeds if no entry

The DELETE request to /roles is meant to remove all /roles entries
corresponding to the current peer.  In the case of no /roles entries
existing, IoTivity was returning error, but should return "deleted"
instead.

Change-Id: Ib98c64822fe77eb7457bd734b168f1b26efd0d61
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22113
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agostatic check: noti test unterminated strings
Mats Wichmann [Fri, 11 Aug 2017 16:12:55 +0000 (10:12 -0600)]
static check: noti test unterminated strings

The test strncpy'd three strings using the strlen of the string,
leaving the destination buffer without the string terminator.
strcpy will do the right thing here since in this case the source is
declared as a string which is sure to be terminated.

Change-Id: I85a15ab92b311481015c898f44b034fe49bf55f4
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21885
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years ago[IOT-2430][IOT-2418] Add eps from default col E.H
uzchoi [Tue, 4 Jul 2017 08:29:03 +0000 (17:29 +0900)]
[IOT-2430][IOT-2418] Add eps from default col E.H

Previous default collection Entity Handler return the payload
without eps info in links parameter and with tls and tcp port info
for OCF1.0 request.
By using updated OCLinksPayloadValueCreate, links payload can be filled
accordingly with eps info for OCF1.0 request and tls/tcp for OIC1.1.

Change-Id: I07081e43d77bd8ff8e7922daa7fcc17844f22cac
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21227
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
6 years agoextlibs: Removing redundant configuration
Pawel Winogrodzki [Thu, 6 Jul 2017 23:50:37 +0000 (16:50 -0700)]
extlibs: Removing redundant configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from extlibs/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Iacd5905d3c221d3d1a142f08a5ea61a899ad08b1
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21299
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 038ec8e2d700d06722c9db43b41b8c534deb42ce)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21441
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
6 years agorsc-enc: Removing redundant env configuration
Pawel Winogrodzki [Tue, 15 Aug 2017 19:49:07 +0000 (12:49 -0700)]
rsc-enc: Removing redundant env configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/resource-encapsulation/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Id3ee5108c07fa22c77dd5998d7b311fbd6fed491
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21943
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
6 years agoservice/resource-encapsulation: SConscript cleanup
Pawel Winogrodzki [Thu, 22 Jun 2017 21:41:10 +0000 (14:41 -0700)]
service/resource-encapsulation: SConscript cleanup

This is a scons scripts cleanup left after fixing /W4 warnings for Windows.

Preparing SConscript files for removal of arbitrary global "env"
modifications in script files outside build_common/ directory.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I39296e61753562a037d7a33f8e1dd3c9803d9843
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21291
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years agonotification: Removing redundant env configuration
Pawel Winogrodzki [Tue, 15 Aug 2017 19:41:39 +0000 (12:41 -0700)]
notification: Removing redundant env configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/notification/*.

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

Change-Id: I7ab34095456499e6d84f0c6f1c6da02887b271e3
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21941
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years agowksxmppxep: Add scriptlet to clone before scons
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
wksxmppxep: Add scriptlet to clone before scons

Bug: https://jira.iotivity.org/browse/IOT-1760
Change-Id: Icb301bb46ca5faab46576deea35ac623646a1ade
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21533
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit 399d88deae071c5fa742bc4f1cc1cb43b07d6989)
Reviewed-on: https://gerrit.iotivity.org/gerrit/22065
Reviewed-by: Mats Wichmann <mats@linux.com>
6 years agoresource: Removing redundant env configuration
Pawel Winogrodzki [Tue, 15 Aug 2017 21:52:16 +0000 (14:52 -0700)]
resource: Removing redundant env configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from resource/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I8383c7d2f14b1c9fea286e0836db50b45b45acb2
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21947
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years agoByte arrays are not zero-terminated.
Dan Mihai [Wed, 23 Aug 2017 20:23:44 +0000 (13:23 -0700)]
Byte arrays are not zero-terminated.

Change-Id: I03413c8fc86f871a1609920e2f0ec6e6e6c43455
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Bug: https://jira.iotivity.org/browse/IOT-2647
Reviewed-on: https://gerrit.iotivity.org/gerrit/22035
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
6 years agoAdd secure property in RD resource.
Ziran Sun [Thu, 17 Aug 2017 13:02:13 +0000 (14:02 +0100)]
Add secure property in RD resource.

Bug: https://jira.iotivity.org/browse/IOT-2614
Change-Id: I719e609baff6a6726e945f38a8102f7865070cbc
Signed-off-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21973
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
6 years ago[IOT-2430] add eps from OCLinksPayloadValueCreate
uzchoi [Mon, 26 Jun 2017 09:18:07 +0000 (18:18 +0900)]
[IOT-2430] add eps from OCLinksPayloadValueCreate

Previous OCLinksPayloadValueCreate function just create the payload
without eps info in links parameter and with tls and tcp port info
for cbor as media format request.
If user input the OCEntityHandleRequest from entity handler callback,
this function will parse whether this is request from vnd.ocf/cbor or
cbor media format using newly created function OCRequestIsOCFContentFormat
here, and create the links payload accordingly with eps info for vnd.ocf
media format request and tls/tcp for legacy cbor type request.

This patch has the seperated handling logic according to ll interface
and baseline interface in HandleLinkListInterface function.
ll interface requires links array payload instead of object with links.

OCLinksPayloadValueCreate API is changed as below.
:return type has PayloadValue to align to other create API.
:ehRequest is added as param. to receive the request media format and so on.

This change also include the fix to exclude the parent node from links
and the fix for tcp and tls property fill-in logic in vnd.ocf/cbor case.

This change add CreateEndpointPayloadList API change to add *epCount
param to return the count of endpoint.

Change-Id: I8f4c5905f35a7ed2286514926385921e407ff674
Signed-off-by: uzchoi <uzchoi@samsung.com>
Signed-off-by: Uze <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20987
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
6 years agosecurity: Fix valgrind output file
Philippe Coval [Fri, 18 Aug 2017 13:06:23 +0000 (15:06 +0200)]
security: Fix valgrind output file

It was generated into iotivity/ut instead of .memcheck file.

Bug: https://jira.iotivity.org/browse/IOT-2599
Change-Id: Ib96a6378513df77e7415378cd37a864fa0cbebb9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22021
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoUpdate RD DB link parsing.
Todd Malsbary [Thu, 17 Aug 2017 22:30:56 +0000 (15:30 -0700)]
Update RD DB link parsing.

- "lt" in RD publish is now "ttl".
- "pri" defaults to 1 in links where it is not present.
- Remove all references to oic.wk.rdpub (except definition in header
  files).

Bug: https://jira.iotivity.org/browse/IOT-2616
Change-Id: I7a55398ab1c8b60166730f33cbce83e0bf193999
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21991
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Habib Virji <habib.virji@samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
6 years agoCoverage & Unit Test Reports automation.
Sushil Yadav [Fri, 11 Aug 2017 09:58:42 +0000 (15:28 +0530)]
Coverage & Unit Test Reports automation.

The Coverage Report generation has been human effort.
This patch adds the needed script and changes to automate
this process as much as possible.

It is two step process:
1. Build the IoTivity code for all modules.
2. Run the script for generating Coverage Reports.

Also Unit Test Reports generation in XML format
The Unit Test Reports are generated in
UnitTestReport directory module wise.

Commit# of code merged from master to 1.3-rel:
  6e78c768af2ad0986ba595654641952476fb4ff6
  4ddfa0f967b3deec7728f6c89fe4be3234d5619b
  227e3c061fc377e59ba65609b329e20bdc7ad1c5

Change-Id: Iec36cf48008479996ee9316120ddc6506d416e9c
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21871
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
6 years ago[RE] Synced changes from master to 1.3-rel branch.
Jay Sharma [Tue, 22 Aug 2017 06:22:37 +0000 (11:52 +0530)]
[RE] Synced changes from master to 1.3-rel branch.

bug: https://jira.iotivity.org/browse/IOT-2267
Change-Id: If1fdd8d20e7a67b917e14bcf8090e8070eb2e5ed
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/22017
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years ago[IOT-2447] Support Multiple Ownership
Oleksii Beketov [Tue, 22 Aug 2017 00:40:53 +0000 (03:40 +0300)]
[IOT-2447] Support Multiple Ownership

Enable MOT

Change-Id: I4cfd4e456d5ae53596cffb6648f1a1d265ed6868
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21577
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agombedtls: Avoid parsing error
Dan Mihai [Fri, 18 Aug 2017 04:24:55 +0000 (21:24 -0700)]
mbedtls: Avoid parsing error

Missing public key was already detected by checking for an
MBEDTLS_ERR_ASN1_UNEXPECTED_TAG error code. But, (p == end) also means
that the public key is missing.

Change-Id: I22861c73fca83bb3d92986e56fadf1778b4c404c
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Bug: https://jira.iotivity.org/browse/IOT-2623
Reviewed-on: https://gerrit.iotivity.org/gerrit/21987
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agosecurity: fix mbedtls_x509_crt_parse error
Dan Mihai [Thu, 17 Aug 2017 20:20:16 +0000 (13:20 -0700)]
security: fix mbedtls_x509_crt_parse error

Add null terminator at the end of the cert, required by
mbedtls_x509_crt_parse.

This patch allows CT1.7.8.5 to make progress with its DTLS handshake.
Handshake fails later on, for different reasons, being investigated.

Change-Id: Iebfcf17be2661f080499961fbd259cef3b1c06d8
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
https://jira.iotivity.org/browse/IOT-2622
Reviewed-on: https://gerrit.iotivity.org/gerrit/21985
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2537] Filter eps returned from RD queries.
Todd Malsbary [Wed, 19 Jul 2017 23:07:54 +0000 (16:07 -0700)]
[IOT-2537] Filter eps returned from RD queries.

When resources in the RD are hosted on the same host as the RD server,
the eps returned in the /oic/res response may be filtered identically
to resources hosted by the RD server itself.  This ensures the
response from either the RD or the publishing device is identical.

Bug: https://jira.iotivity.org/browse/IOT-2537
Change-Id: I655fce9919e09305d1a09f2b6a286427e302e606
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21603
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years agoignore: Gcov generated files
Philippe Coval [Sun, 30 Jul 2017 11:13:41 +0000 (13:13 +0200)]
ignore: Gcov generated files

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Id528461dcc6c07551554a07def899f612df97be6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21711
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: Dan Mihai <Daniel.Mihai@microsoft.com>
(cherry picked from commit bd34290526ec305b6899bd303c2e3f97a76f3147)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21843
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
6 years ago[IOT-2605] Update java samples to have SCT: 9
Alex Kelley [Tue, 15 Aug 2017 19:23:30 +0000 (12:23 -0700)]
[IOT-2605] Update java samples to have SCT: 9

Change-Id: If0380c6cf4bb781f8c86aa986ae2e6ae3a530f73
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21925
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agosecurity: CA cert arrives in publicData
Dan Mihai [Thu, 17 Aug 2017 19:57:41 +0000 (12:57 -0700)]
security: CA cert arrives in publicData

GetCaCert must pick up this cert from the publicData of the credential
sent by CTT/OBT, rather than optionalData.

This behavior is clarified by OCF Security WG CR1938.

This patch allows CT1.7.8.5: DTLS handshake to make progress. The
handshake still fails later on, for different reasons that are being
investigated.

Change-Id: I76962e9f116ad7acb80a6da6c85fb089ebba3481
https://jira.iotivity.org/browse/IOT-2621
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21983
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agosecurity: Fix "GetPkixInfo: empty key"
Dan Mihai [Wed, 16 Aug 2017 00:35:59 +0000 (17:35 -0700)]
security: Fix "GetPkixInfo: empty key"

mbedtls_pem_read_buffer doc specifies that the data must be null
terminated.

This patch allows CT1.7.8.5 to make progress with DTLS handshake.
The handshake still fails later on, due to different reasons that
are being investigated.

Change-Id: I46c89f8cb0eec6156202a9ae3ef3e7b73c85a0f5
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
https://jira.iotivity.org/browse/IOT-2620
Reviewed-on: https://gerrit.iotivity.org/gerrit/21937
Reviewed-by: Way Vadhanasin <wayvad@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>
6 years ago[IOT-2605] Update Service samples to have SCT: 9
Alex Kelley [Tue, 15 Aug 2017 21:18:07 +0000 (14:18 -0700)]
[IOT-2605] Update Service samples to have SCT: 9

Change-Id: I008588e1479e4bd55c4ca58d3227e670dc35e9ed
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21935
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2605] Update c++ samples to have SCT: 9
Alex Kelley [Tue, 15 Aug 2017 21:09:05 +0000 (14:09 -0700)]
[IOT-2605] Update c++ samples to have SCT: 9

Change-Id: I3ef65a1f14329ac53c0050b0f168f95d09cdcc6d
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21933
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2605] Update stack samples to have SCT: 9
Alex Kelley [Tue, 15 Aug 2017 20:57:00 +0000 (13:57 -0700)]
[IOT-2605] Update stack samples to have SCT: 9

Change-Id: Id636475a93e234182b869398fb3bbb7e7cfce624
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21931
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2605] Update security samples to have SCT: 9
Alex Kelley [Tue, 15 Aug 2017 20:44:58 +0000 (13:44 -0700)]
[IOT-2605] Update security samples to have SCT: 9

Change-Id: I653b5bc4c467a01c03f0222a8765edf50fe4283e
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21929
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2605] Update cloud samples to have SCT: 9
Alex Kelley [Tue, 15 Aug 2017 19:08:44 +0000 (12:08 -0700)]
[IOT-2605] Update cloud samples to have SCT: 9

Change-Id: I1cea62c57899352600224b78f5c6767a29347fcc
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21923
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2605] Update IPCA sample to use SCT=9
Alex Kelley [Tue, 15 Aug 2017 18:57:16 +0000 (11:57 -0700)]
[IOT-2605] Update IPCA sample to use SCT=9

Change-Id: Iaf8c40d8043b9b559f488a6f2774d23cf99d369a
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21921
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2561] provision a certificate
Oleksandr Dmytrenko [Mon, 14 Aug 2017 12:41:24 +0000 (15:41 +0300)]
[IOT-2561] provision a certificate

child from [IOT-2263]: 'dos' feature enabling
4) CERT

Change-Id: I0006b0dd357023a3892a0fb6385157cd66274ab1
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21901
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Reviewed-by: Oleh Vasyliev <o.vasyliev@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoIOT-2533 Build java with scons
George Nash [Wed, 2 Aug 2017 00:33:32 +0000 (17:33 -0700)]
IOT-2533 Build java with scons

When building generic_java stop using gradle.
Gradle is required to build aar and apk files
for android but scons is capable of building
the java code without using gradle.

This also has the side effect that we can add
a more complete manifest file that makes running
the samples simpler. We no longer need to run
long commandline java commands to start the
samples.

example:
cd <ouput_dir>/java
java -Djava.library.path=.. -jar simplerserver.jar

See IOT-2419 for SECURED=1 build
Bug: Bug: https://jira.iotivity.org/browse/IOT-2419

Bug: https://jira.iotivity.org/browse/IOT-2533
Change-Id: I8bf5228173745d26114e612a0d82d1f28060d801
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21965
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
6 years ago[IOT-2610] CRL empty query fix
Aleksey Volkov [Wed, 16 Aug 2017 09:38:49 +0000 (12:38 +0300)]
[IOT-2610] CRL empty query fix

Don't return an error if the query string is empty or has unknown parameters.

Change-Id: I96aca3983a446a97ed695552d1a213bfa1700b3e
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21959
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[RE] Fixed indentation of Android Sample Apps.
Jay Sharma [Sun, 13 Aug 2017 10:22:03 +0000 (15:52 +0530)]
[RE] Fixed indentation of Android Sample Apps.

Change-Id: I9ef3d14f39831b7c110daed8b07bc867256a3f89
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21887
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
6 years ago[IOT-2494] SVR DB Editor : Add pstat edit features
Sangjoon Je [Tue, 8 Aug 2017 23:46:41 +0000 (08:46 +0900)]
[IOT-2494] SVR DB Editor : Add pstat edit features

Add pstat add remove modify
Cleanup svrdbeditoracl.c

New Feature: https://jira.iotivity.org/browse/IOT-2494
Signed-off-by: Sangjoon Je <sangjoon.je@samsung.com>
Change-Id: I851e8555f5a1d14332399f0c9aedc53bfa302bb3
Reviewed-on: https://gerrit.iotivity.org/gerrit/21799
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 10fb135447cb2cb192f686b33cb407699de2fbab)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21897
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years ago[JIRA 2545] Adapter control issue.
arya.k [Mon, 31 Jul 2017 11:27:03 +0000 (16:57 +0530)]
[JIRA 2545] Adapter control issue.

Change-Id: I3ddbeaf91b117dbdcfd5f64ad89a13d55d1f003f
Signed-off-by: arya.k <arya.kumar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21679
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>
6 years agojava: Removing redundant configuration
Pawel Winogrodzki [Thu, 6 Jul 2017 23:51:13 +0000 (16:51 -0700)]
java: Removing redundant configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from java/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: I96966e81f52bd9995eab54afbf63091a4a9f62b2
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21869
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
6 years ago"self" URIs are no longer fully-qualified.
Todd Malsbary [Mon, 7 Aug 2017 19:19:53 +0000 (12:19 -0700)]
"self" URIs are no longer fully-qualified.

Bug: https://jira.iotivity.org/browse/IOT-2592
Change-Id: I1ea6c0d8418971afe6caf710faa52b189b22eaad
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21775
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years agoRemove oic.wk.rdpub from RD server.
Todd Malsbary [Mon, 7 Aug 2017 19:02:21 +0000 (12:02 -0700)]
Remove oic.wk.rdpub from RD server.

Bug: https://jira.iotivity.org/browse/IOT-2591
Change-Id: Icb9127e1cfe8d72b17d42e59018bfeb67f42c662
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21773
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years ago[IOT-2610] Fix response for CRL baseline query
Aleksey Volkov [Mon, 14 Aug 2017 15:42:23 +0000 (18:42 +0300)]
[IOT-2610] Fix response for CRL baseline query

Change-Id: I369b810b8759115107da0446cff014eeec43fc05
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21905
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agoFix static analysis issues in CA layer
Veeraj Khokale [Mon, 3 Jul 2017 10:19:18 +0000 (15:49 +0530)]
Fix static analysis issues in CA layer

Fix issues reported by static analysis tool in
connectivity abstraction layer

Change-Id: I49b10536e65219d5f28ebd5acc0c83ffa833d3da
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21209
Reviewed-by: Sushil Kumar Yadav <sushil.ky@samsung.com>
Reviewed-by: koushik girijala <g.koushik@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 8be7f4f9d8bdd4356318e1a258945b451c09276d)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21507
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years agosecurity: Store all incoming credentials
Dan Mihai [Fri, 11 Aug 2017 04:00:07 +0000 (21:00 -0700)]
security: Store all incoming credentials

CBORPayloadToCred returns a list of creds, but list entries other
than the head were being ignored (and leaked) by HandlePostRequest.

Also, go back to LL_APPEND in AddCredential(). Commit
0d511009c8c2e0082ed66359c11cc1f1967b5896 changed that recently to
LL_PREPEND, but the gCred->rownerID update below LL_PREPEND
dosn't make sense anymore (because gCred points to newCred).

The remaining gCred->rownerID updates still look fragile, so it's
very possible those still don't work well.

This patch allows CT1.7.8.5 to find a common ciphersuite with
the target device, when trying to connect using cert credentials.
The target device did not have proper cert creds before this patch -
and therefore the ciphersuites did not match.

CT1.7.8.5 still fails later on, during DTLS handshake - to be
investigated later.

Change-Id: I8205925ca5d30619fdd306847847026a32c8b749
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
bug: https://jira.iotivity.org/browse/IOT-2606
Reviewed-on: https://gerrit.iotivity.org/gerrit/21867
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2583] Fix crash on POST request to crl
Aleksey Volkov [Tue, 8 Aug 2017 16:18:22 +0000 (19:18 +0300)]
[IOT-2583] Fix crash on POST request to crl

Change-Id: Ifb06926c8ccc716d2e86fa73b34122745c3204e6
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21797
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agowksxmppxep: Fix path detections for RA
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
wksxmppxep: Fix path detections for RA

Note for later "if with_ra_ibb" should be in caller scripts

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ib73ad801d5dc183b4594e5104b863de901019201
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21529
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21845

6 years ago[IOT-2411] Attemtping double-free
akk0rd [Tue, 8 Aug 2017 13:53:52 +0000 (16:53 +0300)]
[IOT-2411] Attemtping double-free

Attemtping double-free in otmunittest.cpp

Change-Id: I38d3dfe4e26ae048683cf86d9bdff96bba71e18b
Signed-off-by: akk0rd <v.riznyk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21791
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoRD resource should not be observable.
Todd Malsbary [Mon, 7 Aug 2017 22:29:26 +0000 (15:29 -0700)]
RD resource should not be observable.

All of the resource's properties are hard-coded.

Bug: https://jira.iotivity.org/browse/IOT-2593
Change-Id: I6729596e94494fb4715dbb5ab4ad6ef6fcd551b2
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21777
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
6 years ago[IOT-2594] Add 'throws' to native api declaration
Larry Sachs [Wed, 9 Aug 2017 16:53:57 +0000 (09:53 -0700)]
[IOT-2594] Add 'throws' to native api declaration

getLinkedDevices() native api declaration in OcSecureResource.java
requires a throws clause in order to catch a possible exception
from the jni implementation layer.

Change-Id: Ic1e02b0d0f2980c1fd10d59ed48575ea2d7e6734
Signed-off-by: Larry Sachs <larry.j.sachs@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21839
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
6 years agotizen: Run gsbuild.sh using shebang (bash)
Philippe Coval [Fri, 26 May 2017 11:39:41 +0000 (13:39 +0200)]
tizen: Run gsbuild.sh using shebang (bash)

That script use BASH advanced features ([[ tests ]])

.

Ported from master to 1.3-rel

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I87bc5677c502c86ad7b4fdca630c6dee9c28e335
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20443
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21829

6 years agoexamples: Removing redundant configuration
Pawel Winogrodzki [Thu, 6 Jul 2017 23:49:49 +0000 (16:49 -0700)]
examples: Removing redundant configuration

Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/examples/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Icc1661f2e54c27efbaa9787d082a0e2e121e0e20
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21477
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years agosecurity: Advertise certificate creds support
Dan Mihai [Fri, 11 Aug 2017 00:28:01 +0000 (17:28 -0700)]
security: Advertise certificate creds support

Allow the OBT to discover that the current device/app supports certificate
based credentials.

Note that this is an improvement just for those devices/apps generating a
default *.dat file when they start for the first time. Similar work will be
required for the IoTivity sample apps that use custom-made *.dat files.

CT1.7.4.2 is passing after this change.

Change-Id: Ia63d63e74bf637c376055b5c14ac4620304eb799
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
bug: https://jira.iotivity.org/browse/IOT-2604
Reviewed-on: https://gerrit.iotivity.org/gerrit/21865
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2609] Setup /oic/sec/crl as non-observable
Aleksey Volkov [Fri, 11 Aug 2017 11:40:11 +0000 (14:40 +0300)]
[IOT-2609] Setup /oic/sec/crl as non-observable

Change-Id: I0f23d2c777405946c090a6eff51650ab96a24bc0
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21875
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agoWindows: Change UWP_APP variable to match SCons
Ibrahim Esmat [Fri, 28 Jul 2017 00:54:45 +0000 (17:54 -0700)]
Windows: Change UWP_APP variable to match SCons

We recently added our changes to the SCons repository
to allow us to build UWP Store compatible DLLs from SCons.
Rename the UWP_APP variable to be MSVC_UWP_APP to match
what is used in the SCons repository for building UWP DLLs.

Change-Id: I944afd0077c8690e49f8c03b2edd988c9d77b636
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21671
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years agoAdded system tests for security
Oleh Vasyliev [Thu, 13 Jul 2017 13:44:11 +0000 (16:44 +0300)]
Added system tests for security

Fixed permissions and whitespaces

Change-Id: I94fac7b50dbaa653fb3bf5efa6440e94cee49870
Signed-off-by: Oleh Vasyliev <o.vasyliev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21423
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2494] SVR DB Editor : Add Acl Edit features
Sangjoon Je [Mon, 24 Jul 2017 02:50:39 +0000 (11:50 +0900)]
[IOT-2494] SVR DB Editor : Add Acl Edit features

Print info for ACL_V2
Support Modify ACL
Split svrdbeditor.c into several files
Fix svace issue
Fix valgrind mem leak issue
Fix wrong error msg

New Feature: https://jira.iotivity.org/browse/IOT-2494
Change-Id: I02636ed59e293108a4e5cf6bf7e75a19dafeb455
Signed-off-by: Sangjoon Je <sangjoon.je@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21585
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 32d88bf618d358d8d5cbd1fb7191824c43c051a0)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21801

6 years agoClean unittest query building slightly
Mats Wichmann [Thu, 20 Jul 2017 13:40:34 +0000 (07:40 -0600)]
Clean unittest query building slightly

In two unit tests a string used to build another string,
and thus read-only, is marked const.

In one instance, for consistency the malloc/strcpy sequence to
build the actual query is replaced with the single strdup call used
elsewhere.

In one instance the declaration of a query string is moved to
where it is used.

Change-Id: Iddc0317d446b5bdc099e0045eba4bb1c87062640
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21699
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years ago[IOT-2555] Update path in ProvisioningTest.py
Alex Kelley [Tue, 1 Aug 2017 23:07:56 +0000 (16:07 -0700)]
[IOT-2555] Update path in ProvisioningTest.py

Change-Id: If6aead88b0958237df73da77c41123755c7e4ee9
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21713
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years ago[IOT-2536] Fix regression with RD delete.
Todd Malsbary [Mon, 24 Jul 2017 17:32:34 +0000 (10:32 -0700)]
[IOT-2536] Fix regression with RD delete.

Bug: https://jira.iotivity.org/browse/IOT-2536
Change-Id: Ib3760af5db55bfb464daf692100e8731a7d52092
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21601
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
6 years ago[IOT-2428] Ownership Transfer support
Alex Kelley [Thu, 20 Jul 2017 23:50:29 +0000 (16:50 -0700)]
[IOT-2428] Ownership Transfer support

Update OCClient and OCServer to support ownership transfer.

Change-Id: Iab48685ca4fe6a8b19d6b8cba597a5e25833a7d4
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21621
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years ago[IOT-2560] ProvClient return -1 on timeout
Alex Kelley [Thu, 3 Aug 2017 00:11:25 +0000 (17:11 -0700)]
[IOT-2560] ProvClient return -1 on timeout

This change updates ProvisioningClient's waitCallbackRet to return -1 if it
times out waiting for a callback to indicate the operation has finished.

Change-Id: I904e41fa7fc5fbed73344b08c30c45235678b646
Signed-off-by: Alex Kelley <alexke@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21741
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
6 years agologger: Fix OCLogv by testing EOL
Philippe Coval [Wed, 22 Feb 2017 00:54:43 +0000 (01:54 +0100)]
logger: Fix OCLogv by testing EOL

Change-Id: Ie070f4d01c9a665373221d6924453b7da50cfa4f
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17411
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
(cherry picked from commit 4f456acd2e564c5f271832b6519e1b634f41c60f)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21555
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
6 years ago[IOT-2530] Security provisioning crash fix
Aleksey Volkov [Tue, 25 Jul 2017 09:29:10 +0000 (12:29 +0300)]
[IOT-2530] Security provisioning crash fix

Change-Id: I456a0d09266561c7b6d6f6912e234aac2ca550c0
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21613
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2343] Fix ignoring send failure
Dmitriy Zhuravlev [Tue, 30 May 2017 07:12:31 +0000 (10:12 +0300)]
[IOT-2343] Fix ignoring send failure

CATCPPacketSendCB changed to synchronous completion

Change-Id: I4ed43d5c580ba4beee510d0e0475481c57e571c6
Signed-off-by: Dmitriy Zhuravlev <d.zhuravlev@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20475
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoConvert href, if, rt on links payload
uzchoi [Wed, 26 Jul 2017 09:04:47 +0000 (18:04 +0900)]
Convert href, if, rt on links payload

Previously OCPayloadConvert logic in sever side only convert uri,
types and interfaces for the top level element.
Even if a RepPayload exists in the RepPayload, uri and so on are not
converted.

This patch move the uri, type and interface convert logic into
OCConvertSingleRepPayload which is recrsively called function.

Previous code skipped to convert href in case array payload size is 1
on the top level payload. This logic should be removed at least
considering collection resource with linked-list interface request.
Furthermore, this skip logic is not mandatory code for certification
as of now.

Change-Id: I17b1cc02aed37e9af55126d3af2d28310a3ae733
Signed-off-by: uzchoi <uzchoi@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21629
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
6 years ago[IOT-2066] refactoring ConvertUuidToStr()
v.riznyk [Fri, 28 Jul 2017 14:39:56 +0000 (17:39 +0300)]
[IOT-2066] refactoring ConvertUuidToStr()

Change-Id: If5543c617c3f40193604349ea42df82be5645055
Signed-off-by: v.riznyk <v.riznyk@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21669
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agoCatch up 1.3-rel on resource scons reformats
Mats Wichmann [Sun, 16 Jul 2017 15:33:08 +0000 (09:33 -0600)]
Catch up 1.3-rel on resource scons reformats

Some sconscripts got missed pulling reformats over from master.
This changeset is the scripts in resource (except third_party_libs.scons
which was submitted as a separate changeset)

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: If7e0010a29fec3b73812901916726e425c42df1d
Signed-off-by: Mats Wichmann <mats@linux.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21461
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years agoReformat third_party scons in resource
Mats Wichmann [Sun, 16 Jul 2017 15:37:59 +0000 (09:37 -0600)]
Reformat third_party scons in resource

This one somehow escaped the pull of reformats from master to 1.3-rel

Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Mats Wichmann <mats@linux.com>
Change-Id: Ia7b8e007f038e31c2bfd21ae9ce86509bebda1c0
Reviewed-on: https://gerrit.iotivity.org/gerrit/21425
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years agoConsistency change to one service scons script
Mats Wichmann [Sun, 16 Jul 2017 21:24:17 +0000 (15:24 -0600)]
Consistency change to one service scons script

Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Mats Wichmann <mats@linux.com>
Change-Id: I63dc5476662aa8795748b0eb0c7abd78fb86ae79
Reviewed-on: https://gerrit.iotivity.org/gerrit/21465
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
6 years ago[IOT-2463] Fix CTT failure for Get /oic/sec/roles
Ibrahim Esmat [Tue, 1 Aug 2017 22:47:29 +0000 (15:47 -0700)]
[IOT-2463] Fix CTT failure for Get /oic/sec/roles

Currently the GET request to the /oic/sec/roles resource will fail
with a 400 Bad Request code if the client doesn't have a Public Key
(non-certificate auth) or if the Public Key doesn't match any roles
certificates.

However, that is incorrect since the GET request to the
/oic/sec/roles resource was correct, it just doesn't have any roles
associated with it.

Changed the /oic/sec/roles resource to return an empty "roles" array
if the client doesn't have a Public Key or if the Public Key doesn't
match any roles certificates. At minimum, the return should be:

{
  "roles": [ ],
  "rt": ["oic.r.roles"],
  "if": ["oic.if.baseline"]
}

Testcase: CT1.7.9.1 Verify Security Virtual Resources conform to OIC
Schema

Change-Id: Id71c233875a6ef9e251f2adccd48907e5dedb1a1
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21733
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years agosecurity: publish securevirtualresourcetypes.h
Philippe Coval [Wed, 19 Jul 2017 19:47:36 +0000 (12:47 -0700)]
security: publish securevirtualresourcetypes.h

Designate securevirtualresourcetypes.h
as a "Public Experimental" header.

Those headers are needed for C applications in secured mode
(using OCRepPayloadCreate from ocpayload.h)

  Observed error is:
  .../resource/stack/ocpayload.h:42:40: \
  fatal error: securevirtualresourcetypes.h: \
  No such file or directory

For C++ app there is no such requierements

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I6a37fa82e3a1065541dba8be541ff4ac90e3294a
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21549
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Martin Rösch <martin.roesch@kistler.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
6 years ago[IOT-2494] SVR DB Editor : Improve code
sangjoon.je [Tue, 11 Jul 2017 07:47:09 +0000 (16:47 +0900)]
[IOT-2494] SVR DB Editor : Improve code

Apply c, c++ code standards
Make printf macros

New Feature: https://jira.iotivity.org/browse/IOT-2494
Signed-off-by: sangjoon.je <sangjoon.je@samsung.com>
Change-Id: Iae65b1284d426244c9d9ac3f10691bbda63ac39b
Reviewed-on: https://gerrit.iotivity.org/gerrit/21373
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Youngman Jung <yman.jung@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 8d09aa7a65b9206d02104fe4f105cd59b9a0bcc7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/21573

7 years agoAllow empty array in OCRepPayloadSetIntArray
Abhishek Pandey [Mon, 24 Jul 2017 12:00:14 +0000 (17:30 +0530)]
Allow empty array in OCRepPayloadSetIntArray

[IOT-2458] OCRepPayloadSetIntArray() did not allow empty
array.  Fixed by not returning false when dimTotal is 0
and instead letting the function to get executed when input
array is NULL & dimTotal is 0.

Also fixed the usage of API in easy setup enrollee code.
Now using OCRepPayloadSetIntArrayAsOwner() instead of
OCRepPayloadSetIntArray() as the later duplicates the
memory which can be avoided "by giving payload ownership
to stack".

Added unit test in cbortests to test new API behavior.

Change-Id: If5352b1faf5a9355dd0f8a22882a6af545df6d29
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21591
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Reviewed-by: Todd Malsbary <todd.malsbary@intel.com>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
7 years ago[IOT-2464][IOT-2525] Fix UPDATE impl for cred
Andrii Shtompel [Mon, 24 Jul 2017 16:01:46 +0000 (19:01 +0300)]
[IOT-2464][IOT-2525] Fix UPDATE impl for cred

Change-Id: If167119a1f5c3e49ebc0e01600adb992e79ddbe6
Signed-off-by: Andrii Shtompel <a.shtompel@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21595
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
7 years ago[IOT-2422] Add unimplemented crl GET handler
Aleksey Volkov [Mon, 24 Jul 2017 16:34:12 +0000 (19:34 +0300)]
[IOT-2422] Add unimplemented crl GET handler

- This change adds only missing GET query handler to fix CT1.7.9.1 crl related error.

Change-Id: Icff644dba7df6701c4d3e0cabfc6d2f7cb630825
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21599
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>