1. 20 Nov, 2017 1 commit
  2. 18 Nov, 2017 1 commit
  3. 17 Nov, 2017 1 commit
  4. 15 Nov, 2017 2 commits
  5. 14 Nov, 2017 3 commits
  6. 09 Nov, 2017 3 commits
    • Mats Wichmann's avatar
      Prepare for scons3: change prints and more · 630bb71b
      Mats Wichmann authored
      A previous change updated all the scons scripts:
      
      https://gerrit.iotivity.org/gerrit/#/c/22525/
      
      This change picks up the semi-external scripts that are called
      by the build, and thus are run in the scons context and need updating.
      
      Print statements are surrounded with parens so they look like function
      calls.  This is an scons3 syntax requirement even if still using Python 2.
      
      The old exception format "except FooErr, err" is no longer supported
      in Python 3; since the Python 3 format "except FooErr as err" has been
      available since Python 2.6, there is no problem switching these and it
      makes sense to remove one way things could fail if Py3 is used.
      
      A few comparisons which used <> are changed to the preferred != form.
      
      Reformatted Builder call without changing it, and added a comment in the
      forked version to help explain why there are two copies of UnpackAll.py.
      
      With these changes, a full build completes successfully using scons3.0.
      
      Change-Id: Ia8df28d12c6504d6466dcf793779535d1ad3aa8b
      Signed-off-by: default avatarMats Wichmann <mats@linux.com>
      (cherry picked from commit b34da4aa)
      630bb71b
    • Habib Virji's avatar
      Delete links lazily when TTL is reached. · 231614df
      Habib Virji authored
      Add ttl parameter to RD client APIs.
      
      Bug: https://jira.iotivity.org/browse/IOT-1935
      Change-Id: Ic189cebebbcf8127bea1d127dd11a116e09743bb
      Signed-off-by: default avatarHabib Virji <habib.virji@samsung.com>
      Signed-off-by: default avatarTodd Malsbary <todd.malsbary@intel.com>
      231614df
    • Nathan Heldt-Sheller's avatar
      /pstat Resource CBOR fix · a2b20dc4
      Nathan Heldt-Sheller authored
      Fix for a binary->CBOR marshaling case, where payload
      is to contain "dos", but not "p".  This in in turns causes
      the next Property to be incorrectly placed inside the "dos"
      CBOR map (and then skipped over by the CBOR->binary
      un-marshaling code).
      
      Also improved logging.
      
      Change-Id: Ib28fc1e30fdaf1e639afa940ee2626ba14e77584
      Signed-off-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
      a2b20dc4
  7. 08 Nov, 2017 1 commit
    • Ibrahim Esmat's avatar
      Cherry Pick change to enable building with SCons3 · e5418f06
      Ibrahim Esmat authored
      Cherry Pick Mats change from master to enable building with SCons 3.0
      in 1.3-rel branch. This change and the change in review
      https://gerrit.iotivity.org/gerrit/#/c/22809 will be needed to merge
      together.
      
      With these 2 changes merged to 1.3-rel, you can successfully build
      IoTivity with SCons 3.0. Which will also allow you to build the
      UWP versions of the libraries needed for UWP Apps.
      
      Change in master:
      Prepare for scons3: change prints and others
      
      In preparation for scons3, recently released, modify remaining print
      statements by surrounding them with parens so they look like function
      calls. That takes care of the scons3 syntax requirement.
      
      The remaining instances of the sequence "print FOO; Exit(1)" were
      changed to "msg = FOO; Exit(msg)" - this helps with the change by
      not even using the print statement, and by giving the message to
      the output function, it is sent to the error stream rather than
      the output stream.
      
      Calls to dictionary keys() and values() are now wrapped in list(),
      on Python 3 these return special objects, not the expected list.
      That's harmless to Python 2 usage.
      
      The old exception format "except FooErr, err" is no longer supported;
      since the Python 3 format "except FooErr as err" has been available
      since Python 2.6, there is no problem switching these.
      
      Some instances of using the commands module in extlibs changes to use
      subprocess module. Change is transparent.
      
      A couple of instances of filter(lambda ...)) were changes to
      a python list comprehension, this is considered preferred for
      Python 3 (change was suggested by a conversion tool)
      
      Note on print() change:
      
        When running with Python2, the print statement is still used. That
        has a bit of an impact: print(a) is just prints the argument, but
        print(a, b, c) is interpreted as printing a tuple (a, b, c), so we
        could see:
      
        >>> print "This", "is", "a", "test"
        This is a test
        >>> print("This", "is", "a", "test")
        ('This', 'is', 'a', 'test')
      
        The second is not pretty.  You can make Python2 code use the function
        instead of the statement:
      
        >>> from __future__ import print_function
        >>> print("This", "is", "a", "test")
        This is a test
      
        but that's a pain, so the small number of existing prints which
        used a comma as argument separators were updated to use addition,
        so now we're concatenating a string to produce one arg instead
        of supplying multiple "arguments" that would be misinterpreted
        as a tuple in print().  It's fine to add the import statement
        if it's needed.
      
      Change-Id: Idac00e1389b79ee65da4a2eb6ef3246551b66843
      Signed-off-by: default avatarMats Wichmann <mats@linux.com>
      Signed-off-by: default avatarIbrahim Esmat <iesmat@microsoft.com>
      e5418f06
  8. 07 Nov, 2017 1 commit
  9. 06 Nov, 2017 2 commits
  10. 02 Nov, 2017 3 commits
    • Oleksii Beketov's avatar
      Manufacturer certificate based OTM fix · 4c89aa4b
      Oleksii Beketov authored
      Improper callbacks registration removed.
      Manufacturer certificate related info and ciphers
      callbacks are already set in StartOwnershipTransfer.
      
      Change-Id: Id1cb14cb31e4325d17961737fa87e0224735235a
      Signed-off-by: default avatarOleksii Beketov <ol.beketov@samsung.com>
      4c89aa4b
    • Mats Wichmann's avatar
      Fix a build problem on recent linux host · 92efeea0
      Mats Wichmann authored
      Provisioning unittest will not link when pointed at
      connectivity_abstraction_insternal due to dependency of other libs on
      connectivity_abstraction.  Leads to this error:
      
      /bin/ld: out/linux/x86_64/debug/libroutingmanager.a(routingmanager.o): undefined reference to symbol 'u_linklist_length'
      /home/mats/iotivity.work/out/linux/x86_64/debug//libconnectivity_abstraction.so: error adding symbols: DSO missing from command line
      
      It works fine to link against connectivity_abstraction so use that instead.
      
      Other changes in the SConscript are just cleanup.
      
      Change-Id: I47b846111f4bbaee0ce4d38de7d9e8a0ccc3885b
      Bug: https://jira.iotivity.org/browse/IOT-2864Signed-off-by: default avatarMats Wichmann <mats@linux.com>
      92efeea0
    • Mats Wichmann's avatar
      Adapt gcc version-compare to deal with gcc7, py3 · 754d84d2
      Mats Wichmann authored
      For gcc starting with 7, gcc -dumpversion returns a single (non
      dotted) number. This is actually an illegal version to distutils'
      version.StrictVersion, so use LooseVersion instead, where that is a
      legal number but the comparison still works fine.
      
      For Python 3.x, subprocess.check_output returns a byte string,
      which needs to be decoded before it can be passed to the version
      comparator function. Instead of bothering with the decoder, which is
      hard to get right so it works for both Py2 and Py3 case, call the new
      subprocess.getoutput() method, falling back to check_output if not
      available.
      
      Change-Id: I29e1f43f8fbde130103099be1972b574a23442cf
      Bug: https://jira.iotivity.org/browse/IOT-2862Signed-off-by: default avatarMats Wichmann <mats@linux.com>
      754d84d2
  11. 31 Oct, 2017 4 commits
    • Dan Mihai's avatar
      CT1.7.4.5: Reply with error for bad key · 75f189fd
      Dan Mihai authored
      Return an error response when a Client tries to post a role with a
      mistmatched public key.
      
      Change-Id: Ie689f862d1534093026979c076239fdf604b91e1
      Signed-off-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
      75f189fd
    • Dan Mihai's avatar
      CT1.7.4.5: New null terminator handling · ac02c2f9
      Dan Mihai authored
      Avoid persisting the cert null terminator, to be able to return the
      original cert for RETRIEVE. Add the null terminator just temporarily,
      before calling mbedtls_x509_crt_parse().
      
      This patch allows CT1.7.4.5 to make progress past Check_3. This test
      case still fails later on - to be investigated.
      
      Change-Id: Icda1afaad478548682599f97ff46b3017b01588e
      Signed-off-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
      ac02c2f9
    • Nathan Heldt-Sheller's avatar
      [IOT-2843] remove DOXS access to /crl · 10d49e10
      Nathan Heldt-Sheller authored
      Although the Security Spec is silent on whether DOXS has
      implicit access (that is, a permanent ACE, or default ACE that
      can't be modified) to the /crl Resource.  CTT interprets that
      to mean it doesn't have implicit access, even though DOXS
      can access related configuration Resources (/doxm, /pstat, /acl2,
      /cred).  Rather than fight over it I'm changing because
      either way works, it's just more effort for OBT with implicit
      access reduced.  Still a reasonable inference (though not
      normatively supported).
      
      Change-Id: I86f8a7f1ed217b7bdeb3cae2ab015fb035cd8940
      Signed-off-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
      10d49e10
    • Mats Wichmann's avatar
      Plug memory leak in json2cbor · 19426a57
      Mats Wichmann authored
      In recently introduced code, a pair of temporary buffers is used
      to help convert ascii digits to a number; one is a static
      allocation but the other is OICMalloc'd, but was not freed.
      
      Change-Id: Iab1e8ce48c20aa6332d375c891f6b38ecb6939e7
      Bug: https://jira.iotivity.org/browse/IOT-2863Signed-off-by: default avatarMats Wichmann <mats@linux.com>
      19426a57
  12. 30 Oct, 2017 2 commits
  13. 28 Oct, 2017 2 commits
    • Nathan Heldt-Sheller's avatar
      [IOT-2854][IOT-2858] anon ciphersuite disable · 5f568dfa
      Nathan Heldt-Sheller authored
      Right now the /doxm handler code to disable the anon cipher suite is
      not correct, so it's removed in this patch.  Instead, the /cred code disables
      the anon suite after calculating PSK.
      
      If there is a request is over secure channel, but requester ID
      is Nil UUID, then (in current IoTivity at least) it means that this request
      arrived over DTLS established via anon cipher suite.  A successful
      connection has taken place, and that's an opportunity to disable the anon cipher
      suite so no other anon connections can be made during OTM.
      
      For now, we're just removing the incorrect /doxm code to disable,
      and leaving the more aggressive disable timing for another release.
      
      See [IOT-2858] for more info.
      
      Change-Id: I99c2a48abbfc6f3e5aa52385ee5b778c4c80ccfc
      Signed-off-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
      5f568dfa
    • akk0rd's avatar
      [IOT-2826][IOT-2851]dat file with zero rownerid · 5fdb8a11
      akk0rd authored
      Fixed false generating dat file, added wrapper functions with rowner parameter
      
      Change-Id: Ia8badb9b0b78de5f620f8dbad6f070c1276ebf74
      Signed-off-by: default avatarakk0rd <v.riznyk@samsung.com>
      5fdb8a11
  14. 27 Oct, 2017 6 commits
  15. 26 Oct, 2017 2 commits
    • Dan Mihai's avatar
      CT1.7.4.5: Avoid DER key parse error · 150b2de8
      Dan Mihai authored
      mbedtls_pk_parse_key was not able to parse the key converted to DER
      by GetDerKey(). It encountered in the DER an unexpected key format
      version.
      
      However, mbedtls_pk_parse_key is able to parse correctly the original
      PEM format of the same key.
      
      This patch allows CT1.7.4.5 to establish a connection to an IoTivity
      server. This test case still fails later on - to be investigated.
      
      Change-Id: I933ea9d3b761ed159faa2c4f371890e477caf23f
      Signed-off-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
      150b2de8
    • Nathan Heldt-Sheller's avatar
      [IOT-2843] remove SVR restore behavior · c4025294
      Nathan Heldt-Sheller authored
      These functions were applied at incorrect times (e.g. if a normal
      Update was rejected due to read-only properties during OTM, the entire
      system would "restore" to a wrong state).  They were also wrong,
      in that they restored some values, left others unchanged, and set
      others to wrong values (e.g. presumed JustWorks OTM).
      
      Also, the duplicate message logic was not being used to any consistent
      effect and causing warnings.  It's also completely optional and so was
      removed.
      
      Change-Id: I23d23f946fbafe02cdc2d2ac6ac46abcedd1f149
      Signed-off-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
      c4025294
  16. 25 Oct, 2017 3 commits
    • George Nash's avatar
      IOT-2838 Fix javadoc warnings · 5cfded4d
      George Nash authored
      Documented all the functions referencing the native code.
      
      Note the OcProvisioning setPinType method had a return value
      int. The was returning the return value of the native call
      that was the status. Due to the way the code was writen the
      only value that could be returned was when things worked as
      expected. All other values were thrown so the return value
      was un-needed. The function was changed to have a return type
      of void.
      
      Bug:https://jira.iotivity.org/browse/IOT-2838
      Change-Id: I3b5955a336661574dde9f70c87b6ead3dcd5ea7b
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      5cfded4d
    • George Nash's avatar
      IOT-2539 Enable the -Werror build flag · 418ccc66
      George Nash authored
      The coding standard states:
      Code must compile with no warnings. Without flags
      forcing warnings off.
      see:
      https://wiki.iotivity.org/iotivity_c_coding_standards
      
      Its possible that using an untested version of gcc could
      result in build warings that are not yet fixed. For this
      reason the build option ERROR_ON_WARN was added to make
      it possible to turn off the -Werror flag. This should
      only be used locally an not changed on the CI build.
      
      Due to some bugs in older version of gcc some warnings
      are forced off when using an older version of gcc.
      
      This change will force code to follow the coding
      standard of building with no warnings.
      
      The coapHttpParser code produces a build warning
      that currently is not solved. When building the
      coap_http_proxy library the -Werror build flag is
      removed.
      
      Don't use the -Werror build option for extlib yaml
      code.
      
      Don't use the -Werror build option for coap library
      
      Change-Id: Ifcc25ed7e5b8637ac4383a7bfa51ace105ed9458
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      418ccc66
    • Nathan Heldt-Sheller's avatar
      [IOT-2830] add PSK callback logging · b1659ae0
      Nathan Heldt-Sheller authored
      See JIRA IOT-2830 for more information.
      
      Change-Id: If043f6705ccdede4630b469c13e1933a2b53af16
      Signed-off-by: Nathan Heldt-Sheller's avatarNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
      b1659ae0
  17. 24 Oct, 2017 3 commits