1. 28 Apr, 2020 2 commits
  2. 15 Apr, 2020 3 commits
  3. 02 Apr, 2020 2 commits
  4. 30 Mar, 2020 1 commit
  5. 03 Mar, 2020 3 commits
  6. 27 Feb, 2020 1 commit
    • George Nash's avatar
      Fix static analysis warnings from Codan static analysis tool · 33144537
      George Nash authored
      The codan static analysis tool is built into eclipse CDT which
      I used time to time.
      
      Most of these warnings were suggestions to surround bitwise
      operations with parenthesis.  Some of the suggetions were
      about return values for pthread code in the network_event_thread
      function.
      
      In addition a white space error was fixed in the documentation
      in oc_api.h
      
      The most common warning is about not break statment at the end
      of case statments. All but one of these was done purposly.
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      33144537
  7. 25 Jan, 2020 1 commit
    • George Nash's avatar
      Add OC_STORAGE define that is set in oc_config.h · b0e9dac7
      George Nash authored
      Persistant storage is currently only enabled if OC_SECURITY
      is defined.  This has lead implementation problems when
      implementing features like introspection, cloud, or
      software-update which also require persistant storage.
      
      This commit replaces the `#ifdef OC_SECURITY` with
      `#ifdef OC_STORAGE` in oc_storage.c.
      
      Inside config.h OC_STORAGE is defined if OC_SECURITY, OC_IDD_API
      OC_SOFTWARE_UPDATE, or OC_SECURITY is defined.
      
      Also updated samples that call oc_storage_config so they call it
      if OC_STORAGE is defined instead of OC_SECURITY.
      
      Removed the dummy storage implmentation from the
      oc_cloud_storage.c since OC_STORAGE is now defined by default
      when OC_CLOUD is defined.
      
      Some preprocessor check were added to check it one of the
      features that require OC_STORAGE is set but OC_STORAGE is not
      set. This will cause a build error and inform developers to
      check oc_config.h to make sure OC_STORAGE is set there.
      
      Change-Id: I9a9242349e939393f190cab373fe7d0252ae656c
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      b0e9dac7
  8. 23 Jan, 2020 1 commit
  9. 22 Jan, 2020 1 commit
  10. 10 Jan, 2020 1 commit
  11. 07 Jan, 2020 1 commit
    • George Nash's avatar
      Windows, build swig interfac oc_connectivity.i on debug · 9cee3c5e
      George Nash authored
      Due to a configuration issue the build was only building
      oc_connectivity.i when the release build option was selected
      
      This change will cause oc_connectivity.i to be built for both
      release and debug build.
      
      Additionally oc_connectivity_wrap.c was also added to the build
      of the iotivity-lite-jni project with out adding that none of
      the OCConnectivity functions can be called from Java without
      causing a library link error.
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      9cee3c5e
  12. 21 Nov, 2019 1 commit
  13. 15 Nov, 2019 1 commit
    • George Nash's avatar
      Update branch to add changes from master · fb0c7ff5
      George Nash authored
      - Expose oc_link_add_link_param as OCMain.linkAddLinkParam
      - Expose oc_do_site_local_ipv6_discoveY_all as OCMain.doSiteLocalIPv6DiscoveryAll
      - Expose oc_do_realm_local_ipv6_discovery_all as OCMain.doRealmLocalIPv6DiscoveryAll
      - New callback handler OCDiscoveryAllHandler
      - Update swig interface to map oc_client_cb_t since it was renamed
      - Expose oc_cloud_provision_conf_resource as OCCloud.provisionConfResource
      - Ignore get/set properties callbacks in oc_collection_s and oc_resource
      - Updated OCObt.discoverAllResorces to take
        OCDiscoveryAllHandler as a parameter instead of
        OCDiscoveryHandler
      - Expose oc_endpoint_copy as OCEndpointUtil.copy
      - Expose oc_endpoint_link_copy as OCEndpointUtil.listCopy
      - Expose oc_rep_to_json as OCRep.toJSON
      - Expanded OCRepresentationTest Unit tests for OCRep.toJSON
      - Updated Java samples
        - Removed the calls to freeServerEndpoints from Discovery handers
        - Change DiscoveryHandler to DiscoveryAllHandler in Onboarding samples
        - Added OCEndpointUtil.listCopy when endpoint is assigned from hander
        - Changed Onboarding sample to use HIGH_QOS
      
      Change-Id: Ic6010a65c0845e030c726d01ac378c169078187b
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      fb0c7ff5
  14. 13 Nov, 2019 1 commit
  15. 12 Nov, 2019 1 commit
    • George Nash's avatar
      Move Visual Studio SWIG/JNI build into own project · ae333993
      George Nash authored
      This commit does a few things. It creates a new solution
      IoTivity-lite-Java.  The IoTivity-lite-jni project is
      removed from the IoTivity-lite project.  The swig code
      was separated into its own project IoTivity-lite-swig.
      
      This has two advantages.
      - If developers are not interested in Java or don't have
        swig installed they will be able to build the IoTivity-lite
        project without Unloading the IoTivity-lite-jni project or
        selecting individual build targets from the solution
      - Making a separate solution for IoTivity-lite-swig makes it
        possible to fix the dependency tree.  We used to have to
        always use the Rebuild option because prviously the code would
        give an error because swig had not built the wrapper code yet.
      
      Change-Id: I0955a36614741814d24d4eec65b20d92a64e29a1
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      ae333993
  16. 07 Nov, 2019 2 commits
    • George Nash's avatar
      Updated Android readme for merge · 451775d5
      George Nash authored
      Removed the instruction about checking out swig branch, the
      code will be on master.
      
      Removed the onboarding instructions instead it points people to
      the root level README.
      
      Changed the header underline style I had the header style
      reverse of what it should be for markdown.
      
      Change-Id: I761185b502db6704201b1f1de0fbdd1988024e23
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      451775d5
    • George Nash's avatar
      Expose oc_connectivity.h to Java · 49b34060
      George Nash authored
      Additionally added the -Wno-unused-function when building
      the swig generated code. Swig generates a lot of code for
      dealing with arrays.  Not all of the generated code is
      used.  Our choice is to replicate a subsection of the swig
      input files or we can simply ignore the warning. Which
      is what we are doing.  This is limited only to the swig
      generated wrapper code.
      
      This adds the OC_TCP flag when running swig build
      so pickup functions that are in a ifdef under OC_TCP.
      
      Add oc_connectivity.i to build_swig.sh script.
      
      Change-Id: Idf17fa020c417cb70d726c7e51cfb5112e7c90a6
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      49b34060
  17. 01 Nov, 2019 1 commit
  18. 31 Oct, 2019 2 commits
    • Oleksii Beketov's avatar
      Update mbedTLS to 2.16 · c6c48046
      Oleksii Beketov authored
      Change-Id: Ic7a555c27674f512a51693ae55922d3fa5d792df
      Signed-off-by: default avatarOleksii Beketov <ol.beketov@samsung.com>
      c6c48046
    • George Nash's avatar
      Update the SWIG README.md files · abd622fc
      George Nash authored
      - minor update to the description of what SWIG is
      - removed C++ as a requirement since we now only require C
      - Indicated SWIG version 3.0 was used for developement not the
        newer version 4.0
      - Removed Oracle Java from the list of version of Java code was
        tested against. Indicated this was due to changes in the way
        Oracle licenses Java.
      - Added link to download AdoptOpenJDK since this is the version
        Java currently found on my windows computer.
      - Minor rewording of install instructions
      - Removed request for feedback in the section talking about
        Visual Studio.
      - Updated the onboarding and provisioning section. The
        Onboarding tool has change a lot since the original
        section was writen. I removed most of the example output.
        It now just instructs the developers on the expected input not
        output.
      - Added a small block talking about the Android version of the
        onboarding tool.
      - removed the instructions to copy the iotivity-lite-jni library
        to the iotiviy-lite-java project. This is now done
        automatically by build scripts on the 3 supported operating
        systems
      - Change the directory layout to use ascii characters instead
        of UTF-8 characters they were causing layout issues on
        windows which was expecting Cp1252.
      - Removed the indication that the bindings are still in early
        stage and subject to change. Although this is still a true
        statment the change has slowed down and we want to appear
        as stable as possible.
      - Same changes made to the onboarding and provisioning section
        of the Android README.md as were made to the swig README.md
      Change-Id: I6b192051c766ba5b52667c8eee6fe16e7c7fe42a
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      abd622fc
  19. 28 Oct, 2019 2 commits
    • Alexandru Tiniuc's avatar
      OpenThread get_endpoints fetches all addresses · addaf229
      Alexandru Tiniuc authored
      Previously, oc_connectivity_get_endpoints retrieved the list of IP
      addresses from OpenThread the first time it was called. Future function
      calls would return that same list.
      
      However, the endpoints that can be found at start-up are not necessarily
      the best ones to use. OpenThread devices do not receive a global IP
      address until after they have joined a  Thread network. They only have
      mesh-local and link-local address.
      
      Consequently, a server would only list endpoints with link-local and
      mesh-local addresses within its response to GET /oic/res. Therefore,
      devices outside the Thread network (such as an Android phone running
      OTGC) cannot access these endpoints.
      
      This commit refactors oc_connectivity_get_endpoints so that it generates
      a new list of endpoints every time it is called, using the newest IP
      addresses from OpenThread. This ensures that the global IP address
      endpoint is returned as soon as it is available.
      Signed-off-by: Alexandru Tiniuc's avatarAlexandru Tiniuc <a.tiniuc@cascoda.com>
      Change-Id: Id53273a4a6dfe827587c92e0ac69baa0beca7e01
      addaf229
    • Jozef Kralik's avatar
      implement TCP adapter for windows · 2cbc2bee
      Jozef Kralik authored
      features:
      * tcp stack
      * network monitoring
      * session events
      * dns lookup
      
      limits:
      * max 64 handlers (listen_socks+sessions+signal_handler) per device
      
      Change-Id: I0e070ac04229555f908c343b048d9afc9da078f2
      Signed-off-by: default avatarJozef Kralik <jozef.kralik@kistler.com>
      2cbc2bee
  20. 24 Oct, 2019 1 commit
    • George Nash's avatar
      Fix swig build in Visual Studio · 2d034af9
      George Nash authored
      oc_cloud.i and oc_session_events.i were not being built
      as part of the visual studio build. This was missed because
      the build output left over when running the build_swig.sh script
      that is also used by me from time to time.
      
      Change-Id: Ib62056abd8e868b04be8e7e2c1634f638233a361
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      2d034af9
  21. 22 Oct, 2019 1 commit
    • George Nash's avatar
      Update OnBoardingTool to match C version of tool · 45d3e134
      George Nash authored
      This change has a large amount of changes that were a side
      effects of actually implementing the Onboarding tool changes.
      These changes were made to both versions of the onboarding
      tool. The oc version of the onboarding tool will still need
      updates since the new functions have not yet been reflected
      to the oc code layer.
      
      List of changes:
      - The OC_PKI flag was added to the iotivity-lite-jni library
        file build. This was not needed before because that flag did
        not show up in the header files till now.
      - Add eight new menu options to the Onboarding tool and renumbered many
        of the existing menu options.
        - 1) [7] Discover all resources on the device
        - 2) [18] DELETE ace by aceid
        - 3) [19] RETRIEVE own creds
        - 4) [20] DELETE own cred by credid
        - 5) [21] Provision role RW access to NCRs
        - 6) [22] Provision identity certificate
        - 7) [23] Provision role certificate
        - 8) [96] Install new manufacturer trust anchor
      - New Java functions added to the ObtMain.java to handle the new
        menu options
      - New callback handler functions:
        - DeleteAceByAceIdHandler.java
        - DeleteCredentialIdHandler.java
        - ResourceDiscovery.java
        - RetrieveAcl2Handler.java
        - RetrieveCredintialResourceHandler.java
      - added %extend code for structs that used OC_LIST_STRUCT SWIG
        does not understand how to expand the struct in a useful way
        so a custom get function was added for each list using the
        name `get<list_name>ListHead()`. This change was done in three
        different interface files.
        - 1) oc_collection.i
        - 2) oc_cred.i
        - 3) oc_obt.i
      
      - Renamed the output from OCCred member functions.
        - getPrivatedata() --> getPrivateData()
        - getCredid() --> getCredId()
        - getCredtype() --> getCredType()
        - getSubjectuuid() --> getSubjectUuid()
        - getRole().getRole() --> getRole()
        - getRole().getAuthority() --> getAuthority()
      
      - Custom get functions created to handle if OC_PKI is defined
        or not for OCCred class.
        - getPublicData()
        - getCredUsage()
        - getChain()
        - getChild()
      
      - Renamed the output from OCAceSubjectRole member functions
        - getRole().getRole() --> getRole()
        - getRole().getAuthority() --> getAuthority()
      
      - New methods added to /oc/OcObt.java to match the new methods
        added to OCObt.java.
      
      Change-Id: I272460d6fa27148fa979ab06dcb7ef19aed2806f
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      45d3e134
  22. 15 Oct, 2019 1 commit
    • George Nash's avatar
      Add SWIG interface file for oc_cred.h · dd5da10a
      George Nash authored
      This exposes a lot of new structs that may need to be updated
      based on usage. We may need to remove the default constructor
      and make the types immutable so setter functions are not
      generated. Also need to figure out how to access the creds
      value from the oc_sec_creds_t.
      
      Updated the way enums were generated from the oc_acl.h header
      
      Add build options to build the new oc_creds.i file and the
      wrapper code.
      
      Change-Id: I818d77ee629b35dc31b0ca9d17ac7c2ef39f0724
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      dd5da10a
  23. 10 Oct, 2019 1 commit
    • George Nash's avatar
      Rename include files with `common` suffix · a004bb8b
      George Nash authored
      The reason oc_acl_common.h and oc_cred_common.h have the
      suffix common is because the code contained in the headers
      is common to both the public and private APIs. Using the
      suffix common is meaningless to the user of the iotivity-lite
      framework.  What are the headers "common" to from the user
      perspective?
      
      For this reason the following files have been renamed
        include/oc_acl_common.h --> include/oc_acl.h
        include/oc_cred_common.h --> include/oc_cred.h
        security/oc_acl.h --> security/oc_acl_internal.h
        security/oc_cred.h --> security/oc_cred_internal.h
      
      This removes the confusing "common" suffix while adding
      the "internal" suffix for code that is already considered
      internal to the framework.
      
      The #include has been changed to reflect the new file name.
      
      Change-Id: I15df170f1172e3781dcf42e7716700f1bdea629a
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      a004bb8b
  24. 08 Oct, 2019 2 commits
  25. 07 Oct, 2019 1 commit
  26. 24 Sep, 2019 2 commits
  27. 26 Aug, 2019 2 commits
    • George Nash's avatar
      copy pki_certs into build folder · 837e726a
      George Nash authored
      The sample code showing certificate based OTM have hard
      coded paths to the *.pem certificates. This path is
      relative to the build output for the samples. This
      works for Linux but not for windows which does not
      use the same relative file layout for it build output
      
      Copying the *.pem certs so they are local to the sample
      makes it possible to move the build output without
      reproducing the entier directory structure of the project.
      
      In addition to copying the pki_certs into the build folder
      the Working Directory was updated in the project solution
      so if the code was lauched from the Visual Studio debugger
      it would launch from the proper directory.
      
      Added .gitattributes file.  The *.pem files must have linux
      style line ending if the windows system has core.autocrlf
      set to true the *.pem line ending will be changed to windows
      style line ending causing errors. In addition to explicity
      seting *.pem line ending some general defaults were set for
      some of the most common text formats found in the project.
      
      See https://git-scm.com/docs/gitattributes for more details
      reguarding the .gitattributes file.
      
      Change-Id: I6b63e36c3e496343f02e4af727a4238747c9c12c
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      837e726a
    • George Nash's avatar
      Add new files to Windows build solution · 5c4339f7
      George Nash authored
      This adds oc_mnt.c/.h and oc_session_events_internal.h
      to the windows build solution.
      
      Change-Id: I752f0d5128683fac2baf4ba568eaf1350a96fa09
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      5c4339f7
  28. 21 Aug, 2019 1 commit