1. 15 Mar, 2017 2 commits
    • Adrien Béraud's avatar
      ringaccount: improve loading logic · ad63b452
      Adrien Béraud authored
      * setup trust store when creating device
      * fix createAccount, migrateAccount to use loaded id
        since identity_ is not set anymore
      * useIdentity: loadIdentity will now fail when migration is needed,
        adapt logic. Recursively call loadIdentity when migration has ended.
      Change-Id: Ie4f993fdd13fac894679b96a20fc5eacff5817c3
      Tuleap: #1457
    • Adrien Béraud's avatar
      device migration: emit MigrationEnded signal · a6e3ed73
      Adrien Béraud authored
      Change-Id: I8e767772711d2158e911a34a99fb5550961c2e5e
  2. 10 Mar, 2017 2 commits
    • Adrien Béraud's avatar
      trust request: implement synchronization · ebb16c18
      Adrien Béraud authored
      Change-Id: I9c054f9e3f35f973cf7df168292b9c43b896fa6d
      Tuleap: #1522
    • Adrien Béraud's avatar
      device revocation: refuse loading revoked device · 26ad3277
      Adrien Béraud authored
      The missing piece for working device revocation.
      * cert store: always use certificate chain match to check
        parent certificate.
        We used to allow a certificate if the parent certificate
        was explicitly allowed. This doesn't check for revoked
        device certificate. Instead, always check certificates
        using the standard certificate chain method except if
        the certificate itself is whitelisted.
      * ringaccount: check the account own device certificate chain
        This cause a revoked account to fail loading and propose
        the user to generate a new device from the archive
        through the standard account migration procedure.
      * ringaccount: check device loaded from disc using
        the common routine to discard devices revoked since the last
      Tuleap: #1457
      Change-Id: I03f015e78d1d14f5f2e9f99a6d3dd47a6f2c5bfe
  3. 08 Mar, 2017 1 commit
    • Adrien Béraud's avatar
      device revocation: add DeviceRevocationEnded signal · eb98a9ca
      Adrien Béraud authored
      * add DeviceRevocationEnded signal to allow client to
        be informed when revocation ends
      * implement the signal in ringaccount
      * remove device from account device list on revocation,
        send appropriate signal and sync devices
      Tuleap: #1457
      Change-Id: I0d804e77d420ffcfb01888e68aa07d58eba913e3
  4. 21 Feb, 2017 2 commits
    • Adrien Béraud's avatar
      ringaccount: log message cleanup · 711ab60f
      Adrien Béraud authored
      * add account id to more messages
      * add more details in some messages
      * add user-friendly dht connectivity change
      * minor cleanup
      Change-Id: I2cc9d754a2c9efe22f649cf903042d44a2242252
    • Adrien Béraud's avatar
      ringaccount: save device name after edit · ac39dddc
      Adrien Béraud authored
      After calling setAccountDetails with a new device name,
      set the new device name in the device list
      so the list is not overriten by loading the
      device list from file.
      Change-Id: Ie113e211fb7d0ace1c076122b1bc98ce6a49af08
      Tuleap: #1494
  5. 09 Feb, 2017 1 commit
    • Nicolas Jager's avatar
      migration : fix migrateAccount() · 51009e0d
      Nicolas Jager authored
      - bug : if readArchive() line 1410 throw an exception, migrateAccount()
      will return without emiting any signal.
      - you can reproduce it by passing a wrong password to readArchive().
      - this patch fix the try catch by adding a signal before the return.
      - fix a missing else line 1421. Whitout it, whenever if
      updateCertificates return true, a Migration::State::INVALID signal is
      emited. Wich also leads when updateCertificates is true to emit two
      opposite signals.
      Change-Id: Id3bdbe6ef852095793af7802c75559d033b9f890
      Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
  6. 08 Feb, 2017 2 commits
  7. 06 Feb, 2017 1 commit
    • Nicolas Jager's avatar
      migration : add signals · 041a0ced
      Nicolas Jager authored
      - adds a new kind of signals, called MigrationState.
      RingAccount::migrateAccount now use those signals.
      Change-Id: I1ef5bbd495f5f99d247549e883c8a001418a9bd2
  8. 03 Feb, 2017 2 commits
  9. 02 Feb, 2017 1 commit
    • Guillaume Roguez's avatar
      sip: factorize dialog and invite session creation · a3a5311f
      Guillaume Roguez authored
      SIP dialog and invite session creation code is duplicated
      in SIPAccount and RingAccount call creation code.
      This patch factorizes this code by moving identical parts
      into SIPAccountBase base class.
      The new common method is now CreateClientDialogAndInvite().
      By the way notice that previous duplicated code was locked
      the dialog. This extra lock it uneeded and wrong:
      - wrong because pjsip_dlg_inc_lock() was used, but it should
      be used only temporarily [1]
      - uneeded as the dialog session counter is increased by the invite
      session itself
      The correct way is to call pjsip_dlg_inc_session if we need long
      lock, that not our case here as we manage the invite session.
      [1] http://www.pjsip.org/pjsip/docs/html/group__PJSIP__DIALOG.htm#ga5d87304615303ffbe20a09e0a3ff59df)
      Change-Id: I8c2042b4c0278315cf76ea38affa8b90cab5cc7f
      Tuleap: #64
  10. 31 Jan, 2017 1 commit
  11. 30 Jan, 2017 1 commit
  12. 25 Jan, 2017 1 commit
  13. 24 Jan, 2017 1 commit
    • Adrien Béraud's avatar
      messages: reschedule on error, timeout in ringaccount · d9a0f1f6
      Adrien Béraud authored
      * MessageEngine reschedule sending when receiving an error
      * RingAccount now timeout if no confirmation is received after 1 minute.
      * Text messages related log cleanup
      Change-Id: I0f4136c3f215c49af805b84a2ee8902ffe7d3bb1
      Tuleap: #1478
  14. 23 Jan, 2017 1 commit
  15. 13 Jan, 2017 3 commits
  16. 12 Jan, 2017 2 commits
    • Adrien Béraud's avatar
      ringaccount: add contact management · face491b
      Adrien Béraud authored
      * Add contact-management APIs to DRing
      * addContact/removeContact adds/removes new contact
      * ContactAdded/ContactRemoved signals
      * Contacts are added automatically when a trust request
        is accepted.
      Tuleap: #1445
      Change-Id: Idda65a3a97f03505b20af7b53ff560b454254935
    • Guillaume Roguez's avatar
      dht: IPv6 support for ICE public address · 452e3904
      Guillaume Roguez authored
      This patch uses the fist IPv6 address given by DHT nodes as public address
      used for ICE negotiation.
      This address is used in priority, overloading any previous one registered,
      in particular over IPv4 one.
      Change-Id: Ie3b3d9edcfe61871adcb87b965860530ab4f1d31
      Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
  17. 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
  18. 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
  19. 09 Jan, 2017 1 commit
  20. 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
  21. 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
  22. 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
  23. 13 Dec, 2016 2 commits
  24. 06 Dec, 2016 2 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
    • 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
  25. 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
  26. 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