1. 13 2月, 2014 8 次提交
    • J
      Bluetooth: Fix differentiating stored master vs slave LTK types · 98a0b845
      Johan Hedberg 提交于
      If LTK distribution happens in both directions we will have two LTKs for
      the same remote device: one which is used when we're connecting as
      master and another when we're connecting as slave. When looking up LTKs
      from the locally stored list we shouldn't blindly return the first match
      but also consider which type of key is in question. If we do not do this
      we may end up selecting an incorrect encryption key for a connection.
      
      This patch fixes the issue by always specifying to the LTK lookup
      functions whether we're looking for a master or a slave key.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      98a0b845
    • M
      Bluetooth: Track Secure Connections support of remote devices · eb9a8f3f
      Marcel Holtmann 提交于
      It is important to know if Secure Connections support has been enabled
      for a given remote device. The information is provided in the remote
      host features page. So track this information and provide a simple
      helper function to extract the status.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      eb9a8f3f
    • M
      Bluetooth: Provide remote OOB data for Secure Connections · 519ca9d0
      Marcel Holtmann 提交于
      When Secure Connections has been enabled it is possible to provide P-192
      and/or P-256 data during the pairing process. The internal out-of-band
      credentials storage has been extended to also hold P-256 data.
      
      Initially the P-256 data will be empty and with Secure Connections enabled
      no P-256 data will be provided. This is according to the specification
      since it might be possible that the remote side did not provide either
      of the out-of-band credentials.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      519ca9d0
    • M
      Bluetooth: Add support for local OOB data with Secure Connections · 4d2d2796
      Marcel Holtmann 提交于
      For Secure Connections support and the usage of out-of-band pairing,
      it is needed to read the P-256 hash and randomizer or P-192 hash and
      randomizer. This change will read P-192 data when Secure Connections
      is disabled and P-192 and P-256 data when it is enabled.
      
      The difference is between using HCI Read Local OOB Data and using the
      new HCI Read Local OOB Extended Data command. The first one has been
      introduced with Bluetooth 2.1 and returns only the P-192 data.
      
      < HCI Command: Read Local OOB Data (0x03|0x0057) plen 0
      > HCI Event: Command Complete (0x0e) plen 36
            Read Local OOB Data (0x03|0x0057) ncmd 1
              Status: Success (0x00)
              Hash C from P-192: 975a59baa1c4eee391477cb410b23e6d
              Randomizer R with P-192: 9ee63b7dec411d3b467c5ae446df7f7d
      
      The second command has been introduced with Bluetooth 4.1 and will
      return P-192 and P-256 data.
      
      < HCI Command: Read Local OOB Extended Data (0x03|0x007d) plen 0
      > HCI Event: Command Complete (0x0e) plen 68
            Read Local OOB Extended Data (0x03|0x007d) ncmd 1
              Status: Success (0x00)
              Hash C from P-192: 6489731804b156fa6355efb8124a1389
              Randomizer R with P-192: 4781d5352fb215b2958222b3937b6026
              Hash C from P-256: 69ef8a928b9d07fc149e630e74ecb991
              Randomizer R with P-256: 4781d5352fb215b2958222b3937b6026
      
      The change for the management interface is transparent and no change
      is required for existing userspace. The Secure Connections feature
      needs to be manually enabled. When it is disabled, then userspace
      only gets the P-192 returned and with Secure Connections enabled,
      userspace gets P-192 and P-256 in an extended structure.
      
      It is also acceptable to just ignore the P-256 data since it is not
      required to support them. The pairing with out-of-band credentials
      will still succeed. However then of course no Secure Connection will
      b established.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      4d2d2796
    • M
      Bluetooth: Add management command for enabling Secure Connections · eac83dc6
      Marcel Holtmann 提交于
      The support for Secure Connections need to be explicitly enabled by
      userspace. This is required since only userspace that can handle the
      new link key types should enable support for Secure Connections.
      
      This command handling is similar to how Secure Simple Pairing enabling
      is done. It also tracks the case when Secure Connections support is
      enabled via raw HCI commands. This makes sure that the host features
      page is updated as well.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      eac83dc6
    • M
      Bluetooth: Add support for handling P-256 derived link keys · 66138ce8
      Marcel Holtmann 提交于
      Before being able to enable Secure Connections support, the core needs
      to know on how to handle P-256 derived link keys. The difference between
      authenticated and unauthenticated P-256 derived link keys is the same as
      its P-192 counter parts.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      66138ce8
    • M
      Bluetooth: Add definitions for new link key types · 11015c79
      Marcel Holtmann 提交于
      With the introduction of Secure Connections, the list of link key types
      got extended by P-256 versions of authenticated and unauthenticated
      link keys.
      
      To avoid any confusion the previous authenticated and unauthenticated
      link key types got ammended with a P912 postfix. And the two new keys
      have a P256 postfix now. Existing code using the previous definitions
      has been adjusted.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      11015c79
    • J
      Bluetooth: Fix outgoing authentication requirement check · 264b8b4e
      Johan Hedberg 提交于
      The check for HIGH security level dates back to pre-mgmt times when a
      raw L2CAP socket with HIGH security level was used to trigger dedicated
      bonding. For legacy pairing checking for the security level was the only
      way to catch the need to authenticate in all scenarios. With mgmt
      however, the pair_device command does not use HIGH security but MEDIUM
      security. Therefore, the existing code would never trigger
      authentication for a non-SSP connection without an MITM requirement
      (e.g. if user space provided a NoInputNoOutput IO capability). In such a
      scenario the mgmt_pair_device command would return success without
      actually triggering any kind of pairing.
      
      This patch updates the authentication requirement check to also consider
      MEDIUM security level, and thereby ensures that mgmt_pair_device will
      always trigger authentication.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      264b8b4e
  2. 12 12月, 2013 1 次提交
  3. 04 12月, 2013 5 次提交
  4. 19 10月, 2013 4 次提交
  5. 18 10月, 2013 1 次提交
  6. 17 10月, 2013 1 次提交
  7. 16 10月, 2013 2 次提交
  8. 15 10月, 2013 3 次提交
  9. 14 10月, 2013 1 次提交
  10. 13 10月, 2013 1 次提交
  11. 11 10月, 2013 2 次提交
  12. 10 10月, 2013 1 次提交
  13. 08 10月, 2013 1 次提交
  14. 06 10月, 2013 1 次提交
  15. 05 10月, 2013 2 次提交
  16. 02 10月, 2013 1 次提交
    • J
      Bluetooth: Add a new mgmt_set_bredr command · 0663ca2a
      Johan Hedberg 提交于
      This patch introduces a new mgmt command for enabling/disabling BR/EDR
      functionality. This can be convenient when one wants to make a dual-mode
      controller behave like a single-mode one. The command is only available
      for dual-mode controllers and requires that LE is enabled before using
      it. The BR/EDR setting can be enabled at any point, however disabling it
      requires the controller to be powered off (otherwise a "rejected"
      response will be sent).
      
      Disabling the BR/EDR setting will automatically disable all other BR/EDR
      related settings.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      0663ca2a
  17. 26 9月, 2013 2 次提交
  18. 17 9月, 2013 2 次提交
  19. 21 8月, 2013 1 次提交