1. 11 Jan, 2017 2 commits
    • Guillaume Roguez's avatar
      fix bad usage of shared_ptr as function argument · 66140094
      Guillaume Roguez authored
      Many function/method pass shared_ptr by copy and not by (const) reference.
      As explained here [1], if the smast pointer is not supposed to be modified
      and used as an output argument, it's a bad usage as we cause
      an uneeded copy. As this copy causes a memory lock this lead to CPU
      and memory cache lock bad usage.
      This patch converts all these by-value into by-const-reference
      on all shared_ptr arguments over the daemon sources.
      [1] https://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/
      Change-Id: Ic1e68d93a6917f5e2865b6818b7c1210ff98b1a8
    • Guillaume Roguez's avatar
      fix C++14 usage that brokes some builds · 490ed632
      Guillaume Roguez authored
      Some builds, like OSX and Debian 8, fails to build the daemon
      as a patch has recently introduced a C++14 feature, but we don't
      support C++14 by default on all platforms.
      This patch changes the code to require only a C++11 compiler.
      Change-Id: Ib858a6abddb610b6f94cedc01945c0de92f00687
  2. 10 Jan, 2017 2 commits
    • Adrien Béraud's avatar
      ringaccount: support device revocation · 6c66cf68
      Adrien Béraud authored
      Add support for Ring device revocation.
      Each device manages a local revocation list, synced with
      other devices linked with the account.
      When a device is revoked, its certificate is added to the
      local certificate revocation list (standard x509 CRL).
      CRL support from the trust store and OpenDHT is used.
      Tuleap: #1457
      Change-Id: I227e21afb3234e70ad562a5a4d0cf1084d61f174
    • Adrien Béraud's avatar
      trustrequests: adapt for multi-device · 84510ece
      Adrien Béraud authored
      Change-Id: I1ab520134eb09f6801e820b5ec87967b14056027
  3. 09 Jan, 2017 1 commit
  4. 05 Jan, 2017 3 commits
    • Adrien Béraud's avatar
      ringaccount: factor peer authorization check · 7a0310b7
      Adrien Béraud authored
      Previous implementation was duplicating authorization
      checks between incoming call and message.
      Add two methods to factorize the checks:
      * foundPeerDevice will check the validity of the peer certificate chain
      * onPeerMessage will check the validity of the peer certificate chain,
        perform authorization checks using the account trust store (async),
        and call the provided callback if the peer is authorized.
      Change-Id: I80833a73c6842c9e84677fcaaef2a543745e005b
    • Guillaume Roguez's avatar
      update copyright date to 2017 · a5ded29b
      Guillaume Roguez authored
      Change-Id: I6dbc51dd41c1f44d1446fe7365026af037bc86d9
      Reviewed-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
    • Adrien Béraud's avatar
      ringaccount: update account certificate through account migration · 73f208d1
      Adrien Béraud authored
      Multi-device account migration used a certificate without the CA flag
      to sign the device certificate, preventing to properly validate the
      device certificate chain.
      Fix this by reusing the existing account migration API to ask for the
      account password when the case is detected, placing the account in the
      ERROR_NEED_MIGRATION could also be used for future account migrations,
      when the password is needed to unlock the archive.
      Bump OpenDHT to check the certificate expiration date.
      Tuleap: #1434
      Change-Id: I5527cf5bd31310d969819570cd984e622029fa71
  5. 04 Jan, 2017 1 commit
    • Simon Désaulniers's avatar
      ringaccount: introduce buddy presence on DHT · 55e892f1
      Simon Désaulniers authored
      This functionality of RingAccount exposes methods to "track" a buddy with it's
      ringid. The RingAccount keeps a map of BuddyInfo for all buddies to track. The
      BuddyInfo struct contains the last time the device has been seen online.
      RingAccount exposes the following methods:
      * ::trackBuddyPresence which will look for a buddy's DeviceAnnouncement on the
        DHT to deduce the buddy's presence. This will be done each 10 minutes
        (DeviceAnnouncement expiration time).
      * ::getTrackedBuddyPresence which returns the relevant content from the map of
        BuddyInfo, i.e. if each of the buddy is online or not.
      Change-Id: Ib149585c4835da88b0b0248b4a866770d35afe90
  6. 26 Dec, 2016 1 commit
    • atraczyk's avatar
      build: fix template specialization error on Windows native build · 56cd32d8
      atraczyk authored
      - prevents error C2910 which disallows explicit specialization of
        a member function outside the class if the function has already
        been explicitly specialized via a template class specialization.
      Tuleap: #790
      Change-Id: Idde2413707abf0ef65a3445ea1d577c0394c7121
  7. 15 Dec, 2016 1 commit
    • atraczyk's avatar
      build: remove C99 designated initializers for Microsoft's compiler · f211d38d
      atraczyk authored
      - Microsoft's compiler doesn't support C99 designated initializers.
        Hopefully this we be added in the future, but for now we can
        comment the '.fieldname =' to achieve the same initialization,
        as long as all the elements are initialized in the fixed order
        that they were declared.
      Change-Id: I38af2eb66d583ef8f280ff8b4c7065c7d8229c02
      Tuleap: #790
  8. 13 Dec, 2016 2 commits
  9. 06 Dec, 2016 3 commits
    • Adrien Béraud's avatar
      Revert "ringaccount: factor peer authorization check" · 8afce906
      Adrien Béraud authored
      This reverts commit 60222051.
      Causes issues with peer verification
      Change-Id: Ib7d7d46b1a42ed952ec887b11f9e19b626274bd0
    • Guillaume Roguez's avatar
      contrib: add dtls transport type to pjsip · 88be4bd9
      Guillaume Roguez authored
      A DTLS type is needed for our DHT account.
      This type of transport is based on UDP + TLS.
      This kind of transport behaviour don't exist on
      current PJSIP v2.5.5 release.
      This patch adds this transport type, both for IPv4 and IPv6.
      Our PJSIP bridge class is modifier to support this new type
      for DHT account.
      Change-Id: I247fcb7c89fe23c99c580705c5f4a1d172b9c917
      Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
    • Adrien Béraud's avatar
      ringaccount: factor peer authorization check · 60222051
      Adrien Béraud authored
      Previous implementation was duplicating authorization
      checks between incoming call and message.
      Add two methods to factorize the checks:
      * foundPeerDevice will check the validity of the peer certificate chain
      * onPeerMessage will check the validity of the peer certificate chain,
        perform authorization checks using the account trust store (async),
        and call the provided callback if the peer is authorized.
      Change-Id: I237d3ccae4c6adba232564a05106ff77dc9cd9d8
  10. 05 Dec, 2016 1 commit
    • Guillaume Roguez's avatar
      dht: fix call share_ptr refcount · 48045350
      Guillaume Roguez authored
      The dht listen operation is implemented as a lambda
      and was using a default capture by copy ('=').
      But due to missing brackets and the variable name reuse,
      a share_ptr refcount is overtaken.
      This patch fixes the brackets problem and replace
      the default lambda capture by naming each used variable
      to not have the issue later.
      Change-Id: I613065f0b1224677704d337bf29b6c5355bacedf
  11. 02 Dec, 2016 1 commit
    • Guillaume Roguez's avatar
      fix SipsIceTransport implementation · e375f828
      Guillaume Roguez authored
      SipsIceTransport doesn't set internal PJSIP transport correctly
      causing many troubles in how our ICE/DTLS underlaying transport
      works with PJSIP.
      This patch:
      * adds a custom dtls PJSIP transport type
      * implement correctly custom PJSIP transport creation
      * revert unneeded patches about IM fixes (da0a2d17 and 0cf16b30)
        as this patch fixes also the 30s issue
      Side-effect: this fixes the 'call failed' effect when peer hangs-up
      Change-Id: If88b8245d6c9ff76bc2f2456f06ff65bc5e723b1
  12. 01 Dec, 2016 3 commits
    • Guillaume Roguez's avatar
      dht: reduce code complexity · a00b5e8a
      Guillaume Roguez authored
      RingAccount::incomingCall() is no more blocking and
      also pushes part of its task on an async job.
      So calling this method using 'runOnMainThread' function
      is overkill, add code complexity and useless delay.
      This patch removes the call to runOnMainThread and
      use incomingCall() directly.
      Change-Id: I39bcc03edc8a2cd672cfda6be8fee310963d64f0
    • Guillaume Roguez's avatar
      dht: prevent to start a call with invalid uri · 62aed5a5
      Guillaume Roguez authored
      RingAccount::newOutgoingCall() run inconditionaly a call
      when NameDirectory::lookupUri() has made the lookup, even if the
      response is a failure code.
      This patch prevents the call to be started (and fail later... for nothing)
      in case of negative response of NameDirectory::lookupUri().
      In that case, Call::onFailure(EINVAL) is called to close the object
      and warns upper layers.
      Change-Id: I5236b9221edc353e4a8106778e8b0ba9c5e96e67
    • Guillaume Roguez's avatar
      qa: remove uneeded lambda 'mutable' modificator · b4bcde5e
      Guillaume Roguez authored
      Fix private RingAccount::startOutgoingCall() prototype
      to be able to remove an uneeded lambda 'mutable' in the code.
      Change-Id: I9c6366c6e5d588588ad3678bd2782d56b2a9db61
  13. 30 Nov, 2016 3 commits
  14. 29 Nov, 2016 4 commits
    • Adrien Béraud's avatar
      ringaccount: add forEachDevice · 5fb6d8ba
      Adrien Béraud authored
      Factor iterating over peer devices
      Change-Id: Ia7635a8cad1b73c9a1ebbd6608e15c24d82b68fb
    • Adrien Béraud's avatar
      ringaccount: sync device name · 1a5f1d8c
      Adrien Béraud authored
      Automatically sync device names between devices.
      Change-Id: Ie3c53d11ee0fba7a4bcddde8a45254654c3d4a44
    • Adrien Béraud's avatar
      ringaccount: add custom device name · aaded355
      Adrien Béraud authored
      Add a new editable account detail: the ring device name.
      Change-Id: Id5dc42f276ad761d8b306a10faf97e4fbd58c9a2
    • Guillaume Roguez's avatar
      sip instant message refactoring · da0a2d17
      Guillaume Roguez authored
      This patch is an re-implementation of instant messaging system
      for the SIP layers, to use endpoint's request than dialog's request.
      This fix an issue where a packet drop during the request processing
      causes the dialog to be shutdown with error code 408 afer 30 seconds.
      This leds to shutdown of the whole attached invite session, so the
      call itself it terminated.
      Change-Id: I948c3eb1d6df992ed8364a01806cd92a42cf98a5
      Tuleap: #1077
      Tuleap: #1297
  15. 13 Nov, 2016 2 commits
  16. 11 Nov, 2016 1 commit
    • Adrien Béraud's avatar
      call: set RingID instead of device ID · 9bfcdb6f
      Adrien Béraud authored
      The call peer number is only used to set the peer for
      daemon callbacks for in-call text messages.
      It is currently set to the device ID instead of the RingID, which
      cause client confusion.
      Set the RingID instead.
      Change-Id: I75478afbd83fa5edaeae906fee5f667db7781943
      Tuleap: #1262
  17. 07 Nov, 2016 2 commits
  18. 04 Nov, 2016 1 commit
  19. 03 Nov, 2016 3 commits
  20. 02 Nov, 2016 2 commits
  21. 01 Nov, 2016 1 commit