2 years agoDo not ignore return value of request callback. 97/22597/4
Todd Malsbary [Mon, 25 Sep 2017 21:13:50 +0000 (14:13 -0700)]
Do not ignore return value of request callback.

Change-Id: I6a3056db8fce56ac615729de9c8e4747c83446bc
Signed-off-by: Todd Malsbary <>
2 years agoIOT-2618 remove href prop in introspection res 73/22473/3
Srikrishna Gurugubelli [Thu, 14 Sep 2017 18:10:44 +0000 (11:10 -0700)]
IOT-2618 remove href prop in introspection res

Also made rt and if properties conditional based on whether the query
interface was baseline or not.

Signed-off-by: Srikrishna Gurugubelli <>
Change-Id: I620d422ebc4442a34fa9de8623221de6f341a342

2 years agoRe-enable 32-bit builds on linux 91/22591/6
Mats Wichmann [Mon, 25 Sep 2017 14:25:16 +0000 (08:25 -0600)]
Re-enable 32-bit builds on linux

During various rework of build scripts, a trick which let
32-bit linux builds proceed was lost.  The build wants to
call the 32-bit x86 build 'x86', but Python's platform.machine()
returns a more specific value (as obtained from the operating
system): 'i586' or 'i686'.

Fix from Geoffroy VanCutsem remaps the calculation of a default
value for TARGET_ARCH from platform.machine() to 'x86'.

Also taught {resource,service}/third_party_libs.scons that
in this scenario, cross building is not taking place.

Note this scenario is not built by Jenkins, so will depend
on affected developers affirming this works.

Change-Id: Ieb77a8734a9d17091c396fc8f1bc90e1a3bedb16
Signed-off-by: Mats Wichmann <>
2 years ago[IOT-2483, 2529] Incorrect IPv6 addr in endpoints 15/22515/2 1.3.1-RC2
Veeraj Khokale [Tue, 19 Sep 2017 05:59:14 +0000 (11:29 +0530)]
[IOT-2483, 2529] Incorrect IPv6 addr in endpoints

As per RFC 6874, the zone id of the ipv6 address
in a URI should be preceded by %25 and not just %.
Make this change while creating the ipv6 endpoint

Change-Id: I2e3ec53b16212d374c7ab2ecf6bfd5700c4e62ce
Signed-off-by: Veeraj Khokale <>
2 years ago[IOT-IOT-2739] Simulator plugin crash 85/22585/4
Harry [Mon, 25 Sep 2017 07:06:30 +0000 (12:36 +0530)]
[IOT-IOT-2739] Simulator plugin crash

Simulator server plugin crashed due to heap corruption.
Observe option being added for cancel observe response
where space for observe option will not be allocated in case
of observe cancel.

Change-Id: I29aa321e37070e490b7c3c3ec5d09c34be977cc6
Signed-off-by: Harry <>
2 years agoSimulator:Fix for static analyzer reported issues 01/21501/6
Harry [Tue, 4 Jul 2017 16:33:18 +0000 (22:03 +0530)]
Simulator:Fix for static analyzer reported issues

1. Removal of unused variables.
2. Using Map.empty() than Map.size() for optimization.
3. New API simulator_remote_resource::observe added to accept
   query parameters.

Change-Id: I3e8a4ebf3d03694f4f075a5345f1343d9ea453f8
Signed-off-by: Harry <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Senthil Kumar G S <>
Reviewed-by: Uze Choi <>
(cherry picked from commit 543d59f964c8b16db34897a4440b74fb9b83a2f3)

2 years ago[IOT-2745][Java][1.3.1-RC1] Static Analysis fix. 27/22627/2
Senthil Kumar G S [Wed, 27 Sep 2017 14:54:34 +0000 (20:24 +0530)]
[IOT-2745][Java][1.3.1-RC1] Static Analysis fix.

Java static analysis fix for easy-setup module.
1. Removed unused imports.
2. Updated log to include error info.
3. Avoided multiple statements in single line.
4. Removed unused methods/code.
5. Proper order of java modifiers, etc.

Change-Id: Ida08e2084246aca7c5f1528bb2efe4c57682c85c
Signed-off-by: Senthil Kumar G S <>
2 years ago[IOT-2638] Remove Deprecated API 99/22399/2
akk0rd [Fri, 8 Sep 2017 15:00:42 +0000 (18:00 +0300)]
[IOT-2638] Remove Deprecated API

MOTSendPostDoxmCB is using a deprecated function OCDoResource

Change-Id: Ibeb8f5a57011f832765a7994194d1da98e572d09
Signed-off-by: akk0rd <>
2 years agobuild: Use global RPATH value 55/22355/6
Philippe Coval [Fri, 21 Jul 2017 11:52:38 +0000 (13:52 +0200)]
build: Use global RPATH value

Also introduce ORIGIN for crosscompiler.

RPATH can be convenient to avoid developer to deal with environment variables
(LD_LIBRARY_PATH or PATH on windows), as we're using them for now.

In longer term, this can be replaced by relative pathes,
once the installation process is fixed
(at least on systems supporting ORIGIN).

It was tested on yocto poky master.

Change-Id: Ibaabc31b8dc744267e4c6c1c682d2090da9ada96
Signed-off-by: Philippe Coval <>

2 years ago[IOT-2752] Update invalid cert chain handling 79/22579/3
Alex Kelley [Fri, 22 Sep 2017 00:05:54 +0000 (17:05 -0700)]
[IOT-2752] Update invalid cert chain handling

Update the handling of an invalid cert chain so that we move to the
next chain before cleaning up the invalid chain.

Change-Id: I95e4e410a9bca81a698f2c074cfca18b203e5133
Signed-off-by: Alex Kelley <>
2 years agoresource-directory: Check links before free 27/22127/5
Philippe Coval [Thu, 24 Aug 2017 14:23:51 +0000 (16:23 +0200)]
resource-directory: Check links before free

In case if pointer has not been assigned

This is also suppressing a valgrind warning
when running test resource/csdk/stack/test/stacktests:

  2,208 bytes in 1 blocks \
  are possibly lost in loss record 0 if 0

Change-Id: Ifd44172a1f7755ec253748f6f02fbfd1dcacdd39
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: George Nash <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Ashok Babu Channa <>
(cherry picked from commit 2c926be5e04dd982316c05c461c9a95fd0beae9a)

2 years agoRename macro VERIFY_CBOR_SUCCESS 63/22563/2
Steven Saunders [Thu, 21 Sep 2017 23:43:32 +0000 (17:43 -0600)]


Change-Id: I5ee8795a21d8d84708737f83957fe260cf1234d2
Signed-off-by: Steven Saunders <>
2 years ago[IOT-2539] Remove maybe-uninitialized warning 83/22083/5
George Nash [Tue, 1 Aug 2017 18:21:09 +0000 (11:21 -0700)]
[IOT-2539] Remove maybe-uninitialized warning

The compiler was indicating that the request.len and
request.bytes maybe used uninitialized. Best I can
tell the OCByteString is initilaized in the GenerateCSR
function. The compiler can not tell that it is
initilaized so it is zero initialized at creation.

Change-Id: I19dd9818b1485ec0da64b48dc2510c8e939c6c0f
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 88ce2816c8cca2f775927a03b2843446cc743e6d)

2 years agonotification: Removing redundant configuration 27/21327/12
Pawel Winogrodzki [Fri, 28 Apr 2017 04:21:50 +0000 (21:21 -0700)]
notification: Removing redundant configuration

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

Change-Id: I696f93a0fde5fcbe7ed8f3509b4de1747825d5fd
Signed-off-by: Pawel Winogrodzki <>
2 years agoFix build error: WITH_MQ 09/22509/3
Ziran Sun [Mon, 18 Sep 2017 15:12:30 +0000 (16:12 +0100)]
Fix build error: WITH_MQ

Change-Id: If4249e5cf198fcb1dad4969d2cb7b141adb687b4
Signed-off-by: Ziran Sun <>
2 years agoCorrect wrong settings on format. 71/22571/3
Ziran Sun [Fri, 22 Sep 2017 11:36:30 +0000 (12:36 +0100)]
Correct wrong settings on format.

Change-Id: Icde3607a38559598d91902c57d159b6784fecea1
Signed-off-by: Ziran Sun <>
2 years ago[IOT-2724] ES Mediator Android Sample Crash. 55/22555/5
Senthil Kumar G S [Thu, 21 Sep 2017 16:32:13 +0000 (22:02 +0530)]
[IOT-2724] ES Mediator Android Sample Crash.

Updated JNI file to add iotivity stack version in EnrolleeConfig representation.
Updated sample to parse wifi modes and frequencies based on the version.

Change-Id: I1580823bdf3309369eb747dca4d3ce1bc3087158
Signed-off-by: Senthil Kumar G S <>
2 years ago[IOT-2748] Fix OCProvisionSymmetricRoleCredentials 11/22611/2
Alex Kelley [Mon, 25 Sep 2017 22:54:10 +0000 (15:54 -0700)]
[IOT-2748] Fix OCProvisionSymmetricRoleCredentials

This chanage updates OCProvisionSymmetricRoleCredentials to use internal
APIs that change the DOS state before and after updating credentials.

Change-Id: I351ee00c9a1a182d8ffe41f73c5eaf4eda4dfb52
Signed-off-by: Alex Kelley <>
2 years ago[IOT-2756] Handle empty cert chain in role entry 95/22595/2
Alex Kelley [Fri, 22 Sep 2017 21:36:11 +0000 (14:36 -0700)]
[IOT-2756] Handle empty cert chain in role entry

Update HandleDeleteRequest to return OC_EH_RESOURCE_DELETED when the role
entry does not contain any cert chains.

Change-Id: Id393a67da10c4f18f8fb69ed15de7782bdac9c70
Signed-off-by: Alex Kelley <>
2 years agoUpdate IoTivity version to 1.3.1 09/22409/3
Philippe Coval [Fri, 8 Sep 2017 17:22:15 +0000 (19:22 +0200)]
Update IoTivity version to 1.3.1

Change-Id: Idf208ace8c533da9d7587cd1a56aeca81edee9d2
Signed-off-by: Philippe Coval <>
2 years agonotification: Fix wrong NULL affectation 27/22027/2
Philippe Coval [Thu, 20 Jul 2017 11:17:59 +0000 (13:17 +0200)]
notification: Fix wrong NULL affectation

To numbers or pthread type

Change-Id: Id0e1354608f83553cc84cc855becf46ced3d0cd2
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit a389836e1991a57f7cb74198209dc8a375654a36)

2 years agoEasySetup:Fix for static analyzer reported issues 19/21519/11
Harry [Tue, 4 Jul 2017 13:07:48 +0000 (18:37 +0530)]
EasySetup:Fix for static analyzer reported issues

Removal of never used methods and catching exceptions by reference.

Change-Id: I10d3c83ce5b14174b6f82a49897738c98a461af7
Signed-off-by: Harry <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Senthil Kumar G S <>
Reviewed-by: Phil Coval <>
(cherry picked from commit e450d10699a504c90cb37fba3e9a551d93278e25)

2 years ago[IOT-2729] Update role resource and certhelpers 57/22557/2
Alex Kelley [Tue, 19 Sep 2017 19:30:36 +0000 (12:30 -0700)]
[IOT-2729] Update role resource and certhelpers

1. Update OCInternalVerifyRoleCertificate to add the issuer as the
   authority if the role certificate IoTivity received does not
   contain an authority in the subject alternative name.
2. Update GetEndpointRoles to check for OC_STACK_NO_RESOURCE and
   OC_STACK_INVALID_PARAM so it can fall back to symmetric key role
   handling when the connection is not secured with a certificate.

Change-Id: Ieba2bfbbf5edfb32d74c24b5f668a8ee9d530354
Signed-off-by: Alex Kelley <>
2 years agocsdk: Avoid to overlap memcheck files for UT 67/22067/10
Philippe Coval [Wed, 23 Aug 2017 15:03:35 +0000 (17:03 +0200)]
csdk: Avoid to overlap memcheck files for UT

From now on, it's better to align executable name


Change-Id: I8c8fd9ee68b01dfcc62d8a250c26649a82ba116e
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: George Nash <>
Reviewed-by: Alex Kelley <>
Reviewed-by: Mats Wichmann <>
(cherry picked from commit 52da664568c4071151dfb6bcf506163ebaba2957)

2 years agoIPCA: Install libipca dir to libdir 77/22077/2
Philippe Coval [Mon, 7 Aug 2017 07:08:33 +0000 (09:08 +0200)]
IPCA: Install libipca dir to libdir

It needs to be install to variant dir along other libs then
dependency libs will be also be found using RPATH.

Change-Id: I4e9ff5ad8b72850f5ef79a093502edf53c8e64d7
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 811ad50df741db60420cd2415ad8c94378cd79f1)

2 years agoIPCA: Convert JSON file to UNIX format 39/22139/2
Philippe Coval [Fri, 18 Aug 2017 12:02:40 +0000 (14:02 +0200)]
IPCA: Convert JSON file to UNIX format

Change-Id: I4e95cda451f0ec2ba3f0363de748fe68c15869a4
Signed-off-by: Philippe Coval <>
2 years agoTransform OC_EH_OK into 2.02 for DELETE. 81/22281/3
Todd Malsbary [Wed, 30 Aug 2017 21:24:27 +0000 (14:24 -0700)]
Transform OC_EH_OK into 2.02 for DELETE.

Currently OC_EH_OK is turned into 2.04 for POST or PUT.  This change
does the equivalent for DELETE.

Change-Id: I3b64d9c3a9471cdff25160ffab96928e0512fc33
Signed-off-by: Todd Malsbary <>
2 years agoList child resource eps instead of parent. 77/22277/6
Todd Malsbary [Wed, 30 Aug 2017 19:10:37 +0000 (12:10 -0700)]
List child resource eps instead of parent.

Change-Id: I90917f5fd965fd0e811326d3674cb751e5ac989e
Signed-off-by: Todd Malsbary <>
2 years agoStack sample client fix 15/21615/3
Oleksandr Dmytrenko [Tue, 25 Jul 2017 11:09:52 +0000 (14:09 +0300)]
Stack sample client fix

Stack sample client support old servers

Change-Id: Id9fffc3b9e73c68820b99e5fd197d742d0b19418
Signed-off-by: Oleksandr Dmytrenko <>
2 years agoprovisioning: Use .tmp suffix for test file 57/22057/10
Philippe Coval [Fri, 18 Aug 2017 12:36:45 +0000 (14:36 +0200)]
provisioning: Use .tmp suffix for test file

We can use .tmp suffix for generated files to be ignored in git repo

Change-Id: I70d109e590784777a0ce2a87fa7451676bad20e8
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Randeep Singh <>
(cherry picked from commit a8abd0026c9fc8c8e6679202168f79c6206eff72)

2 years ago[IOT-2539] clean switch warning 11/22211/2
George Nash [Mon, 31 Jul 2017 20:00:55 +0000 (13:00 -0700)]
[IOT-2539] clean switch warning

The file deviceonboardingstate.c produced a warning:
enumeration value 'DOS_STATE_COUNT' not handled in switch

This is a result of adding the the DOS_STATE_COUNT as an
enum value. This is a common programming pattern but will
result in the -Wswitch warning if the enum values are
used in a case statement without a default state.

There are multiple ways to handle this warning.
- add an empty case for the unhandled count state
- add a default case to the switch statement
- move the count out of the enum

For this fix the unhandled count state was added
to the switch statment with an assert if that case
is ever encountered.

Change-Id: I14c390b34d33db9a82a3bd055dd513a96c941733
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit b76529cbc0004b40b8142fb6721deff67eddb0e4)

2 years agoservice: clean up compiler warning 21/22221/2
George Nash [Fri, 14 Jul 2017 20:36:08 +0000 (13:36 -0700)]
service: clean up compiler warning

Clean up the implicit-function-declaration warning in
CoapHttpHandler.c. The compiler is not finding the
OCParsePayload function so it is interpreting it as a
function that takes 4 parameters and returns an int.
This is a result of how old C compilers handle

The fact that OCParsePayload was used incorrectly was hidden
it should have 5 parameters not 4.  The code now includes the
internal header ocpayloadcbor.h and fixes the call to

Change-Id: I894e3d423617c15c1ce2cf35825637984d1babd8
Signed-off-by: George Nash <>
Reviewed-by: Larry Sachs <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Phil Coval <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Rick Bell <>
(cherry picked from commit 35bcc24dde8e62832360092fa4da44b60e24305f)

2 years agoIOT-2539 Cleanup unused-parameter warning 95/22195/2
George Nash [Mon, 7 Aug 2017 21:40:26 +0000 (14:40 -0700)]
IOT-2539 Cleanup unused-parameter warning

This is a set of code that will sometimes have a warning
depending on what is defined. To prevent the
unused-parameter warning the parameters are cast to void.
A empty operation that will be compiled out but prevents
the warning.

Change-Id: I08c73fb565b62d3a760956976a012331863a6c73
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 598e8c5b7e7ad9cfc6fab77f5843e5e390509728)

2 years ago[IOT-2539] remove the -Wcpp warning from octimer.c 87/22187/2
George Nash [Thu, 27 Jul 2017 17:49:05 +0000 (10:49 -0700)]
[IOT-2539] remove the -Wcpp warning from octimer.c

This warning comes from teh glibc library. The library
has a # warning in the code if _BSD_SOURCE or _SVID_SOURCE
are defined in the code. The code that was enabled using
the two macros has been depricated. The new _DEFAULT_SOURCE
macro should be used to enable the features that were
enabled by the old macros.

If you need to build with old and newer versions of glibc
the glibc release notes recomend using both the old and
new macros.

Change-Id: I000d3bbfe4fdc473066d8c50862070c8b49788ca
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Phil Coval <>
(cherry picked from commit 97bc6dcae86b4d97953a66abee12ad09acb02d00)

2 years agoIOT-2678 Change Java back to dynamic linking 37/22537/4
George Nash [Wed, 20 Sep 2017 19:32:12 +0000 (12:32 -0700)]
IOT-2678 Change Java back to dynamic linking

Java was changed to use static linking for most of
the libraries. This was done to enable building Java
on Windows which does not contain the same dynamic
libraries as are avalible to Linux and Android.

See IOT-2405

Unfortanatly this change caused an issue in the Android
serivces. It caused multiple instances of the IoTivity
stack to be included in different libraries used by
the Android services.

This reverts the key elements of IOT-2405 without
reverting the entier change.


This is being done till we can figure out how to
enable the build on windows so it does not cause
multiple copies of the oc stack.

Windows java will no longer build if this commit
is accepted. However, Android is considered a
higher priority OS when it comes to the Java

Change-Id: I54e9e65b00a199151395542d9e4629cef4efe516
Signed-off-by: George Nash <>
2 years agoSvrdbeditor print certs 17/22517/2
Oleksii Beketov [Tue, 19 Sep 2017 11:37:33 +0000 (14:37 +0300)]
Svrdbeditor print certs

Add print certificates

Change-Id: I92092c96ed467877bad8517c02d2d936b25f038b
Signed-off-by: Oleksii Beketov <>
2 years ago[IOT-2306] Remove Direct Pairing 49/21449/18
v.riznyk [Fri, 14 Jul 2017 08:51:47 +0000 (11:51 +0300)]
[IOT-2306] Remove Direct Pairing

Remove direct pairing and pconfresource

Change-Id: Ia71db37f0c2ecbf2d7a62a8363c0949ada7e0f9e
Signed-off-by: v.riznyk <>
2 years ago[IOT-2475] Remove direct pairing from Java layer 81/21781/9
saurabh.s9 [Tue, 8 Aug 2017 09:59:34 +0000 (15:29 +0530)]
[IOT-2475] Remove direct pairing from Java layer

Removed build failure issue for android
Change-Id: I3519cf8a8efff806f9a53aebc608150acc7d4427
Signed-off-by: saurabh.s9 <>
2 years agoiOS build fix 07/22507/2
Mats Wichmann [Mon, 18 Sep 2017 10:18:41 +0000 (04:18 -0600)]
iOS build fix

recent change dropped some characters which broke iOS build (which is
not tested by Jenkins), restoring them here.

Change-Id: Ic44e6239f11094ccebf9eb891805d28bf02aeee7
Signed-off-by: Mats Wichmann <>
2 years ago[IOT-2737] Fix build warning in routing layer. 27/22527/2
Senthil Kumar G S [Fri, 18 Aug 2017 13:07:11 +0000 (18:37 +0530)]
[IOT-2737] Fix build warning in routing layer.

Warning: dereferencing type-punned pointer will
break strict-aliasing rules [-Wstrict-aliasing].

Change-Id: I19a851e0bf16e4b46ba6b7ed1167cb50c4502f18
Signed-off-by: Senthil Kumar G S <>

2 years ago[IOT-2718] Update Roles resource 21/22521/1
Alex Kelley [Mon, 18 Sep 2017 20:33:21 +0000 (13:33 -0700)]
[IOT-2718] Update Roles resource

1. Update RolesToCBORPayload to handle large role certificate chains
that require allocating more memory.
2. Update GetEndpointRoles to fix AV when adding multiples roles to the
list of roles to return.

Change-Id: I08de68eb0b2757bd17eb9ffe4e304ee378165266
Signed-off-by: Alex Kelley <>
2 years ago[IOT-2617] Enable Anon Ciphersuite after RESET 99/22499/2
Nathan Heldt-Sheller [Fri, 15 Sep 2017 23:25:06 +0000 (16:25 -0700)]
[IOT-2617] Enable Anon Ciphersuite after RESET

The Anon Ciphersuite should be enabled after RESET if the Device
by default has the oxmsel == JUSTWORKS, so that a Client isn't
required to re-select the JUSTWORKS OTM in order to enable the

Change-Id: I6ab06b958959b1cad5e04f0bc63e90c8c4202785
Signed-off-by: Nathan Heldt-Sheller <>
2 years agoprovisioning: Fixed memory leak 23/22223/7
George Nash [Mon, 28 Aug 2017 23:25:21 +0000 (16:25 -0700)]
provisioning: Fixed memory leak

Fixed memory leak found using valgrind. The memory
leak was due to the provisionInit function calling
sqlite3_open_v2 without calling sqlite3_close

There was not provisionClose method in the C++ so it was
added to the OCSecure class. To do this OCClosePM was
also added to that the code could be used in Windows.

The provisioningClose call was added to all of the samples
that are currently calling provisioningInit(dbfile)

While updating the some of the android samples the
tab depth was cleaned.

Note the unit tests are not following one of the most
basic rules of unit testing. Tests should be isolated
and independent. When the cleanup code was added to the
unit tests it broke tests that run later. Each individual
unit test should be able to run independent of all the
other unit tests order should not matter. This commit
does a little to break the dependency tests have on other
tests, but it did not fix it completely. Many tests rely
on the DB being left in a state by another test as well as
passing test state to global variables that hold information
outside the individual test.

Change-Id: Id2c05ecc611516a5cf892ae70bb4e0cd0c115752
Signed-off-by: George Nash <>
2 years agotizen: Remove RPATH info on install 97/22097/4
Philippe Coval [Fri, 11 Aug 2017 14:44:28 +0000 (16:44 +0200)]
tizen: Remove RPATH info on install

Libraries will be install to regular system path (/usr/lib),
so RPATH info is no more relevent.

Change-Id: I7492b772ab5b2a43f5d493c9334202617b7f0282
Signed-off-by: Philippe Coval <>
Reviewed-by: Dave Thaler <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: George Nash <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Rick Bell <>
Reviewed-by: Ziran Sun <>
(cherry picked from commit f0950b65d934fca41c4252dd198480696f61eb2b)

2 years agoIOT-2539 Fix write-strings warning 93/22193/3
George Nash [Fri, 4 Aug 2017 18:57:02 +0000 (11:57 -0700)]
IOT-2539 Fix write-strings warning

The write-strings warning comes from assigning
the a const string to a char* that is not const.
From everything I see in this example the string
is not changed so simply using const_cast will
remove the warning.

If these values are always expected to be constant
we may want to consider changing the strutures
to hold const char * not char *. Without further
investigation I did not feel safe making that

Change-Id: Ib9053a1041b72b1fd05329999efc7a7ff28aab94
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Phil Coval <>
Reviewed-by: Rick Bell <>
(cherry picked from commit ff88390c2889d3e20bdbdcf73e10ada7584ab8e8)

2 years agoIOT-2539 Fix return-type warning 79/22179/2
George Nash [Wed, 2 Aug 2017 22:59:06 +0000 (15:59 -0700)]
IOT-2539 Fix return-type warning

The _worker function expects a void * return type
only functions with return type of void do not have
to have a return.

Since the return value does not appear to be used
simply return NULL.

Change-Id: I3cee6f7a491320d21b1d70f9a8df0f7b4538087b
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Phil Coval <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Rick Bell <>
(cherry picked from commit 9a55ebdaefd544b37c7534b479ceff33ccc9f123)

2 years ago[IOT-2539] clean implicit-function-declaration 89/22189/2
George Nash [Mon, 31 Jul 2017 16:55:14 +0000 (09:55 -0700)]
[IOT-2539] clean implicit-function-declaration

The pdu.c file was producing an implicit-function-declaration
warning for the ntohs() function. The ntohs function is part
of the arpa/inet.h header.  This is conditionally included
based on the HAVE_ARPA_INET_H macro. The HAVE_ARPA_INET_H
macro is defined in the iotivity_config.h header. So
iotivity_config.h must be included in pdu.c to properly detect
the macro.

It looks like some systems may supply the ntohs() function
without arpa/inet.h. So it is unclear if the call to the
function its self needs some added macros.

Change-Id: I7e19d65e1371d46b35d70a5ecdf06fb0b73152ff
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit 9b704e02253b181f88c00aad98083bfeb55328ae)

2 years ago[IOT-2268] cleanup unused-local-typedefs warning 13/22213/2
George Nash [Tue, 25 Jul 2017 16:38:19 +0000 (09:38 -0700)]
[IOT-2268] cleanup unused-local-typedefs warning

The definition used for the OC_STATIC_ASSERT created
an unused typedef with an array of an invalid size
if the assert condition was not met. This resulted
in an unused-local-typedef warning every time
OC_STATIC_ASSERT was used even if it did not cause
a static assert.

The macro was updated to create an enum of 1/condition
if the condition is false this will create a compiler
warning because 1/0 is an invalid value. Its supprisingly
difficult to find a macro that will satisfy C, and C++
for most standard compilers. With out producing a warning.

Also when possible the __COUNTER__ macro is used to create
the unique identifier for the OC_STATIC_ASSERT this
addresses the problem of using the static ASSERT on the
same line. This would have been an issue with the original
way the code was written.

Change-Id: I4a9cc8d61702eacaddfd1ae5679126af02208f5e
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Rick Bell <>
(cherry picked from commit db426b113862fddd2241029dd8f7ee4bed01e39a)

2 years agoIOT-2539 Fixed incompatible-pointer-types warning 05/22205/3
George Nash [Tue, 15 Aug 2017 19:50:20 +0000 (12:50 -0700)]
IOT-2539 Fixed incompatible-pointer-types warning

The function GetResourceFromHandle was returning a PIResource**. When
the actual code was inspected it was returning a PIResourceBase** that
was being cast to a PIResource**. That value was then used as a
PIResource**. The only reason this code worked is because the way C
lays out structs in memory is sequential Since the first element of the
PIResoruceBase is a PIResource treating the the PIResourceBase like
a PIResource worked only by virtue of the memory layout rules for C

Later in the zigbee_wapper.c it relies again on the memory layout
rules for structs to assign PIResource** to a PIResource_Zigbee**.

This relies too much on internal knowledge of memory layout and is
a potential management problem. The code tied 3 structs together
based on there memory layout.

To fix the issue. The GetResourceFromHandle now returns PIResourceBase**
which was the actual type returned. In the cleanup code the pointer
is change from PIResource* to PIResourceBase*. Now when the value is
passed into the DeleteResource function it no longer generates the
incompatible-pointer-types warning.

In zigbee_wrapper.c we no longer cast the PIResource_Zigbee* to
PIResource* we now pass in the part of the PIResource_Zigbee that is
actually the PIResourceBase.

Change-Id: I6b147a52c522d036d016e2cd15e2900e6fc06249
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Larry Sachs <>
Reviewed-by: Rick Bell <>
(cherry picked from commit 25898d822bea23ec7f19b6858026de493031c70e)

2 years agoUse path in persistent storage open callback. 25/22425/3
Todd Malsbary [Mon, 11 Sep 2017 23:22:36 +0000 (16:22 -0700)]
Use path in persistent storage open callback.

Change-Id: Ia72de1fd70d5b7b665e56661e53c5b97c51c375e
Signed-off-by: Todd Malsbary <>
2 years ago[Easy Setup] Memory leak fix 87/22487/2
Abhishek Pandey [Fri, 15 Sep 2017 13:00:29 +0000 (18:30 +0530)]
[Easy Setup] Memory leak fix

JIRA IOT-2721:

Change-Id: Ie9309fc6830b5473e8b7482b798d59bb2aed2e13
Signed-off-by: Abhishek Pandey <>
2 years agojava: Fix doxygen mistakes in doc 65/22365/4
Philippe Coval [Fri, 25 Aug 2017 07:50:53 +0000 (09:50 +0200)]
java: Fix doxygen mistakes in doc

Change-Id: I7ca840a000fcd22366123c87a0f5b086806be9ec
Signed-off-by: Philippe Coval <>
2 years ago[IOT-2419] Update the samples to run with security 37/22437/4
George Nash [Tue, 12 Sep 2017 22:37:54 +0000 (15:37 -0700)]
[IOT-2419] Update the samples to run with security

This uses the same acl files that were introduced in
The simple server was updated to default to a secure interface.

Tested by running against each other and the C++
simpleserver simpleclient samples.

Change-Id: I623fc40759a6382568de572cedf9aa8f52fbfbe9
Signed-off-by: George Nash <>
2 years agosecurity: Example support SVR ACL v2 and fix PS 89/21489/9
Philippe Coval [Tue, 29 Aug 2017 15:11:59 +0000 (17:11 +0200)]
security: Example support SVR ACL v2 and fix PS

Update json file to support ACL from CSDK, inspired by:

Also add persistent storage to overload security dat file.

Make example working again using:

  ./simpleserver 2

  Observe registration action is successful
        SequenceNumber: 0
        state: true
        power: 55
        name: John's light

Note those .dat files were generated from master branch
using json2cbor tool automatically,
1.3-rel does not have the scanner generator yet.

Change-Id: Id457fedd74bf7540c2a223e4ab079076af1f2134
Signed-off-by: Philippe Coval <>
2 years agobuild: Preserve target_os change 53/22353/4
Philippe Coval [Wed, 6 Sep 2017 17:10:05 +0000 (19:10 +0200)]
build: Preserve target_os change

Yocto sets target_os variable to 'linux', we want to keep it.

help_vars.Update(env) from 03f23f37 is introducing a regression.

Change-Id: I688a1a613691a5005bb3c019202466b85d725a4c
Signed-off-by: Philippe Coval <>
2 years ago[IOT-2678] Adding Null check to fix crash 55/22455/2 1.3.1-RC1
Sushil Yadav [Thu, 14 Sep 2017 11:42:48 +0000 (17:12 +0530)]
[IOT-2678] Adding Null check to fix crash

Change-Id: I360d5ffbe468f16e40a1f1f3171edd1c0d23e94d
Signed-off-by: Sushil Yadav <>
2 years ago[IOT-2686][Android] Discovery fails for BT/LE 63/22363/3
Veeraj Khokale [Thu, 7 Sep 2017 09:06:40 +0000 (14:36 +0530)]
[IOT-2686][Android] Discovery fails for BT/LE

OCCopyResource() should not return NULL if creating
the endpoint payload list returns NULL.

Change-Id: I069dbfc0530c2b6560a55e650bc993beef120714
Signed-off-by: Veeraj Khokale <>
2 years agoMerge branch easysetup into 'origin/1.3-rel'. 83/22483/2
Abhishek Pandey [Fri, 15 Sep 2017 06:23:00 +0000 (11:53 +0530)]
Merge branch easysetup into 'origin/1.3-rel'.

Change-Id: I2cf5e7a25ab985f2b2e7b613ef0cb8af7dd3a851
Signed-off-by: Abhishek Pandey <>
2 years ago[Easy Setup] Adding logs for OTM failure reason 29/22429/6
Abhishek Pandey [Tue, 12 Sep 2017 07:10:32 +0000 (12:40 +0530)]
[Easy Setup] Adding logs for OTM failure reason

[Easy Setup] Adding Ownership transfer failure reason logs

- Mapped failure due to Timeout to ESResult::ES_COMMUNICATION_ERROR.
- Added error logs for developers to know failure reason.
- Optimized for loop with a break when matching resource is found.

Signed-off-by: Abhishek Pandey <>
Change-Id: I0e1e0fce5834acc625347198497a9e420b54909c

2 years agoEasySetup:Applied "href" and "rep" to POST request 69/22469/3
Abhishek Pandey [Thu, 14 Sep 2017 16:35:07 +0000 (22:05 +0530)]
EasySetup:Applied "href" and "rep" to POST request


- Applied "href" and "rep" to POST request using oic.if.b (batch interface).
- Updated the handling for provision wifi & cloud properties
- Verified Enrollee & Mediator on Linux with sample apps.
- Linux Unit tests verified locally.
- Also fixed on build warning in easysetup_x.c (sample app).

Change-Id: I5e5d7c495d45dd8eb41ca5bcce2af8e18fd53c71
Signed-off-by: Abhishek Pandey <>
2 years ago[IOT-2709] MOT fail fix 47/22447/2
Aleksey Volkov [Wed, 13 Sep 2017 14:08:50 +0000 (17:08 +0300)]
[IOT-2709] MOT fail fix

This change revert some lines from

This is workaround to keep compatibility with other modules
 which use credentials with rownerId inside.

Anyway, this behavior should be refactored in next releases.

Change-Id: Ib338ba1e41366c40f878743080d9271446d95fff
Signed-off-by: Aleksey Volkov <>
2 years ago[IOT-2539] clean unused-variable warning 03/22203/3
George Nash [Tue, 1 Aug 2017 18:59:36 +0000 (11:59 -0700)]
[IOT-2539] clean unused-variable warning

The global variable are not being used because the code that
uses them was blocked out using #if 0 till IOT-2106 is fixed.

The variables have also been blocked out same as the code
that was using the variables.

Change-Id: I6f6289c3a34a83e69a2ac7918086d3752e7fd93e
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
(cherry picked from commit dca9520b255d9bb19a0406b4bd730e4120c81a96)

2 years ago[IOT-2630]Add acl default behavior 13/22013/7
Oleksandr Dmytrenko [Mon, 21 Aug 2017 08:58:49 +0000 (11:58 +0300)]
[IOT-2630]Add acl default behavior

In case not found in acl request,
make acl2 request

Change-Id: Ic1cb8006ea0218601b9a64b71d65623bb920a67b
Signed-off-by: Oleksandr Dmytrenko <>
2 years agodi is not a mandatory DELETE query parameter. 79/22279/2
Todd Malsbary [Wed, 30 Aug 2017 21:03:42 +0000 (14:03 -0700)]
di is not a mandatory DELETE query parameter.

Change-Id: If9e6c94f0e5896ef6ae129775166078da402d9b5
Signed-off-by: Todd Malsbary <>
2 years agoSecurity error notification engine 23/20323/26
saurabh.s9 [Fri, 1 Sep 2017 05:40:59 +0000 (11:10 +0530)]
Security error notification engine

Errors happens during OCDoResource calls should be returned to app layer

Previously, session errors (handshake failed) didn't returned properly to app layer
and this cause side effects (CA retransmission works in cases when it should not)

Current state:
1. Source code builds ok
2. Secure stack samples (UDP/TCP) works well (both positive/negative cases)
3. Provisioning (OTM, 20th menu item) works well for following:
   a. justworks    positive UDP/TCP, negative UDP case
   b. mfg          positive UDP/TCP, negative UDP case
   c. mv_justworks positive UDP/TCP, negative UDP case
   d. randompin    positive UDP/TCP, negative UDP case
4. OTM in provisioning via TCP - negative case - should work properly after fix IOT-2454

How to test:
1. Positive case - just test samples (f.e secure stack samples) & provisioning with all servers
2. Negative case - add following code which artificially breaks handshake (to ca_adapter_net_ssl.c)
   if (peer->ssl.state == MBEDTLS_SSL_CERTIFICATE_REQUEST)
   And again test all samples and provisioning with all servers.
   As result - you should see an error returned to app immidiately (without timeouts, etc)
   and there should be no CA retransmission attempts (UDP case)

Change-Id: Ia1fe1c7c58f9e40040a0be5e7e83abbc66f80bfe
Signed-off-by: Andrii Shtompel <>
Signed-off-by: saurabh.s9 <>
2 years ago[IOT-2628][EasySetup]Add new prop. swat,swet 45/22445/1
Ankur Bansal [Sun, 20 Aug 2017 09:28:59 +0000 (14:58 +0530)]
[IOT-2628][EasySetup]Add new prop. swat,swet

Add new mandatory properties to oic.r.wificonf
- swat: Enrollee's supported Wi-Fi Authentication Types
- swet: Enrollee's supported Wi-Fi Encryption Types
- Update Enrollee sample apps (Linux and Tizen).

Note: This impacts Easy Setup Enrollee API "ESSetDeviceProperty".

Change-Id: Ic765671dfbe3a4e1c8a857ef6ae1d3dcb9ba783e
Signed-off-by: Ankur Bansal <>
2 years ago[IOT-2628][EasySetup]Update WifiConf prop. types 07/22307/6
Ankur Bansal [Mon, 14 Aug 2017 09:18:24 +0000 (14:48 +0530)]
[IOT-2628][EasySetup]Update WifiConf prop. types

- Change properties from integer to string enums: swmt, swf, wat, wet
- Change supported frequencies from single value to array.
- Create type converters for enum to string and string to enum.
- Remove EOF marker in enum WIFI_MODE.
- Update Enrollee sample apps (Linux and Tizen).
- Cleanup some unused code in easysetup.c.
- Fixed unit test cases for Enrollee and Mediator.

Note: This impacts Easy Setup Enrollee API "ESSetDeviceProperty".

Thanks-To: Abhishek Pandey <>
Change-Id: Iea8191616cea89a0273e0f5486bd259735e914fa
Signed-off-by: Abhishek Pandey <>
Signed-off-by: Ankur Bansal <>
2 years agoMerge "[IOT-2339] Add NULL check before variable access." into 1.3-rel
Ashok Babu Channa [Tue, 12 Sep 2017 14:25:06 +0000 (14:25 +0000)]
Merge "[IOT-2339] Add NULL check before variable access." into 1.3-rel

2 years agoMerge "[IOT-2361] Perform NULL check before dereference." into 1.3-rel
Ashok Babu Channa [Tue, 12 Sep 2017 14:24:53 +0000 (14:24 +0000)]
Merge "[IOT-2361] Perform NULL check before dereference." into 1.3-rel

2 years agoMerge "[IOT-2634]Color log level" into 1.3-rel
Randeep Singh [Tue, 12 Sep 2017 11:50:26 +0000 (11:50 +0000)]
Merge "[IOT-2634]Color log level" into 1.3-rel

2 years agoMerge "[IOT-2641] /cred resource rownerid fix" into 1.3-rel
Randeep Singh [Tue, 12 Sep 2017 09:41:40 +0000 (09:41 +0000)]
Merge "[IOT-2641] /cred resource rownerid fix" into 1.3-rel

2 years agoMerge branch 'origin/1.3-rel' into easysetup 31/22431/1
Abhishek Pandey [Tue, 12 Sep 2017 08:29:47 +0000 (13:59 +0530)]
Merge branch 'origin/1.3-rel' into easysetup

Change-Id: Ifb56e84a7c38b8f376e7fd5272d7095ae562bf46
Signed-off-by: Abhishek Pandey <>
2 years agoMerge "[IOT-2065] CloudAcl code conditionally compiled" into 1.3-rel
Randeep Singh [Tue, 12 Sep 2017 04:37:02 +0000 (04:37 +0000)]
Merge "[IOT-2065] CloudAcl code conditionally compiled" into 1.3-rel

2 years agoMerge "IOT-2539 removed unused code from subownerclient.c" into 1.3-rel
Randeep Singh [Tue, 12 Sep 2017 04:34:48 +0000 (04:34 +0000)]
Merge "IOT-2539 removed unused code from subownerclient.c" into 1.3-rel

2 years agoMerge "resource-encapsulation: Fix test's output filename" into 1.3-rel
Mats Wichmann [Mon, 11 Sep 2017 21:46:46 +0000 (21:46 +0000)]
Merge "resource-encapsulation: Fix test's output filename" into 1.3-rel

2 years agoMerge "provisioning: Support older python for tests" into 1.3-rel
Mats Wichmann [Mon, 11 Sep 2017 18:14:21 +0000 (18:14 +0000)]
Merge "provisioning: Support older python for tests" into 1.3-rel

2 years agoMerge "[IOT-2696] Allow chain of certs in public data" into 1.3-rel
Nathan Heldt-Sheller [Mon, 11 Sep 2017 16:35:17 +0000 (16:35 +0000)]
Merge "[IOT-2696] Allow chain of certs in public data" into 1.3-rel

2 years agoMerge "[IOT-2511] Get OCResourceHandle from resource" into 1.3-rel
Ziran Sun [Mon, 11 Sep 2017 10:29:23 +0000 (10:29 +0000)]
Merge "[IOT-2511] Get OCResourceHandle from resource" into 1.3-rel

2 years agoMerge "security: Add roles cert null terminator" into 1.3-rel
Randeep Singh [Mon, 11 Sep 2017 10:16:41 +0000 (10:16 +0000)]
Merge "security: Add roles cert null terminator" into 1.3-rel

2 years agoMerge "IOT-2539 Remove missing-field-initializers warning" into 1.3-rel
Randeep Singh [Mon, 11 Sep 2017 10:02:51 +0000 (10:02 +0000)]
Merge "IOT-2539 Remove missing-field-initializers warning" into 1.3-rel

2 years agoMerge "IOT-2539 Removed unused-function" into 1.3-rel
Randeep Singh [Mon, 11 Sep 2017 09:59:59 +0000 (09:59 +0000)]
Merge "IOT-2539 Removed unused-function" into 1.3-rel

2 years ago[IOT-2511] Get OCResourceHandle from resource 19/22319/3
Martin Roesch [Mon, 17 Jul 2017 11:07:05 +0000 (13:07 +0200)]
[IOT-2511] Get OCResourceHandle from resource

Implement getResourceHandle() method in RCSResourceObject
to allow the resource to be published to a RD.

Change-Id: I3ea2a162ef1fa9f3beeb65e62a34d571300b8c2e
Signed-off-by: Martin Roesch <>
2 years agoES Mediator update to align with OCF 1.3 Spec 07/22407/2
Abhishek Pandey [Sat, 9 Sep 2017 13:29:12 +0000 (18:59 +0530)]
ES Mediator update to align with OCF 1.3 Spec

- Updated mediator logic based on version checking API from OCResource class.
- Get Configuration Response parsing updated as per spec version.
- provisionProperties updated as per spec version

Change-Id: Iad208bbeb08e3dbdb749bf6d280c5e60231164a2
Signed-off-by: Abhishek Pandey <>
2 years agoMerge "IOT-2539 remove unused function warning" into 1.3-rel
Randeep Singh [Mon, 11 Sep 2017 04:37:31 +0000 (04:37 +0000)]
Merge "IOT-2539 remove unused function warning" into 1.3-rel

2 years agoMerge "[IOT-2539] Clean implicit-function warning" into 1.3-rel
Randeep Singh [Mon, 11 Sep 2017 04:36:31 +0000 (04:36 +0000)]
Merge "[IOT-2539] Clean implicit-function warning" into 1.3-rel

2 years agoMerge "[IOT-2539] Clean sign-compare warnings" into 1.3-rel
Randeep Singh [Mon, 11 Sep 2017 04:02:51 +0000 (04:02 +0000)]
Merge "[IOT-2539] Clean sign-compare warnings" into 1.3-rel

2 years agoMerge "Improve .gitignore slightly" into 1.3-rel
Mats Wichmann [Sun, 10 Sep 2017 15:51:52 +0000 (15:51 +0000)]
Merge "Improve .gitignore slightly" into 1.3-rel

2 years agoMerge "tools: Add exec permissions on scripts" into 1.3-rel
Mats Wichmann [Sun, 10 Sep 2017 15:45:08 +0000 (15:45 +0000)]
Merge "tools: Add exec permissions on scripts" into 1.3-rel

2 years agoMerge "ignore: Temporary files with .tmp suffix" into 1.3-rel
Mats Wichmann [Sun, 10 Sep 2017 15:44:53 +0000 (15:44 +0000)]
Merge "ignore: Temporary files with .tmp suffix" into 1.3-rel

2 years agoMerge "Add getServerHeaderOption API in OCResource." into easysetup
Ashok Babu Channa [Sat, 9 Sep 2017 12:33:18 +0000 (12:33 +0000)]
Merge "Add getServerHeaderOption API in OCResource." into easysetup

2 years agobuild: warnings as errors in jni code 19/22219/2
George Nash [Fri, 21 Jul 2017 19:46:44 +0000 (12:46 -0700)]
build: warnings as errors in jni code

All build warnings have been cleaned from the
Java JNI code to make sure it continues to build
without warnings we are treating all warnings
as errors.

Change-Id: I05e7d75b81bed25b5f62ba353ff41ea28bca620a
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Rick Bell <>
(cherry picked from commit de6a8023a209bfa316d329fa9b790310bde6ad81)
Reviewed-by: Larry Sachs <>
2 years ago[IOT-2539] Removed unused-param warning 15/22215/3
George Nash [Thu, 27 Jul 2017 00:17:02 +0000 (17:17 -0700)]
[IOT-2539] Removed unused-param warning

Now that -Werror is turned on for JNI code the error
must be fixed to build. This was missed earlyer
because it is only build when WITH_CLOUD=1 is in the
scons options which is not a default build option.

Change-Id: I7790cba1baa140c3059f0a91b66882425ed5a6cb
Signed-off-by: George Nash <>
Reviewed-by: Larry Sachs <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Rick Bell <>
(cherry picked from commit db7b6d26c941525c0e8428f70864905997861c90)

2 years agoresource-encapsulation: Fix test's output filename 23/22023/9
Philippe Coval [Fri, 18 Aug 2017 12:38:37 +0000 (14:38 +0200)]
resource-encapsulation: Fix test's output filename

Align to other .memcheck suffixes for valgrind

Change-Id: Id51f1b3168226b83710a2047f4256cce7bf6f129
Signed-off-by: Philippe Coval <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Ziran Sun <>
Reviewed-by: Mats Wichmann <>
(cherry picked from commit 7f5c93862a43c2234b43df93d94fa532eb75ee32)

2 years ago[IOT-2696] Allow chain of certs in public data 01/22401/1
Alex Kelley [Thu, 7 Sep 2017 00:31:34 +0000 (17:31 -0700)]
[IOT-2696] Allow chain of certs in public data

Previously we expected the leaf certificate to be present in public data
and the chain of intermediate CAs to be present in optional data. After
discussion it was agreed to update IoTivity to expect the entire chain
of certificates to be present in public data.

Change-Id: Ib4a53b31451205da4b06c41404b5088568844825
Signed-off-by: Alex Kelley <>
2 years agoMinor change: Correct wrong use of variable. 15/22315/3
Ziran Sun [Mon, 4 Sep 2017 14:50:48 +0000 (15:50 +0100)]
Minor change: Correct wrong use of variable.

Change-Id: I39c531cbca0e27291a091c09907975e950c90cde
Signed-off-by: Ziran Sun <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Phil Coval <>
2 years ago[IOT-2539] Fix format= warining 81/22181/2
George Nash [Tue, 1 Aug 2017 17:18:56 +0000 (10:18 -0700)]
[IOT-2539] Fix format= warining

The sscanf was using %lu flag that is a long unsigned int
while passing in a uint32_t value which is an unsigned int

This changes the flag from %lu to %u to clean the format

Change-Id: Iba1d10e2b2403fa5adb94650764ee04c290c951b
Signed-off-by: George Nash <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Dave Thaler <>
Reviewed-by: Dan Mihai <>
Reviewed-by: Mats Wichmann <>
Reviewed-by: Rick Bell <>
(cherry picked from commit a86f7d8c1d6d4516b021a76c7bfd59b16ce3f027)
Reviewed-by: Randeep Singh <>
2 years ago[IOT-2515] File descriptor leak 99/21899/8
Veeraj Khokale [Mon, 14 Aug 2017 10:11:08 +0000 (15:41 +0530)]
[IOT-2515] File descriptor leak

Repeatedly calling OCInit2() followed by OCStop() causes
the process to run out of file descriptors. To fix this
the following changes are made to IP adapter:

1. Close the ip global socket FDs before reinitializing them.
2. Close the shutdownFds[0] FD when receive thread is stopped.

Change-Id: I1e0f336cd3d6de2297aa3421b47c8b8d810f82fb
Signed-off-by: Veeraj Khokale <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Todd Malsbary <>
Reviewed-by: koushik girijala <>
Reviewed-by: Phil Coval <>
Reviewed-by: Ashok Babu Channa <>
2 years ago[IOT-2065] CloudAcl code conditionally compiled 91/22391/2
akk0rd [Fri, 8 Sep 2017 09:07:11 +0000 (12:07 +0300)]
[IOT-2065] CloudAcl code conditionally compiled

CloudAcl code should be conditionally compiled out by default

Change-Id: I10da20f5e192073a8ed6228dbc0601e0da42a7af
Signed-off-by: akk0rd <>
2 years ago[IOT-2112] No unit tests 15/21915/11
akk0rd [Tue, 15 Aug 2017 09:30:39 +0000 (12:30 +0300)]
[IOT-2112] No unit tests

No unit tests for CASelectCipherSuite/OCSelectCipherSuite

Change-Id: I71a75b172d65bd15ff2e511d5190f1441275f46d
Signed-off-by: akk0rd <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Randeep Singh <>
2 years ago[IOT-2675] Fix occlient sample app crash 31/22331/6
koushik.girijala [Wed, 6 Sep 2017 09:27:23 +0000 (14:57 +0530)]
[IOT-2675] Fix occlient sample app crash

NULL check added

Change-Id: I36ccb505024c036921c906efaf9443892ac7d5ba
Signed-off-by: koushik.girijala <>
Tested-by: jenkins-iotivity <>
Reviewed-by: Veeraj Khokale <>
Reviewed-by: Ashok Babu Channa <>