1. 28 Mar, 2015 5 commits
  2. 27 Mar, 2015 3 commits
  3. 26 Mar, 2015 9 commits
  4. 25 Mar, 2015 2 commits
  5. 24 Mar, 2015 7 commits
  6. 23 Mar, 2015 1 commit
  7. 22 Mar, 2015 1 commit
  8. 21 Mar, 2015 1 commit
  9. 20 Mar, 2015 3 commits
  10. 19 Mar, 2015 1 commit
  11. 18 Mar, 2015 3 commits
  12. 17 Mar, 2015 4 commits
    • Johan Hedberg's avatar
      Bluetooth: Add workaround for broken OS X legacy SMP pairing · 19c5ce9c
      Johan Hedberg authored
      OS X version 10.10.2 (and possibly older versions) doesn't support LE
      Secure Connections but incorrectly copies all authentication request
      bits from a Security Request to its Pairing Request. The result is that
      an SC capable initiator (such as BlueZ) will think OS X intends to do SC
      when in fact it's incapable of it:
      
      < ACL Data TX: Handle 3585 flags 0x00 dlen 6
            SMP: Security Request (0x0b) len 1
              Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
      > ACL Data RX: Handle 3585 flags 0x02 dlen 11
            SMP: Pairing Request (0x01) len 6
              IO capability: KeyboardDisplay (0x04)
              OOB data: Authentication data not present (0x00)
              Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
              Max encryption key size: 16
              Initiator key distribution: EncKey (0x01)
              Responder key distribution: EncKey IdKey Sign (0x07)
      < ACL Data TX: Handle 3585 flags 0x00 dlen 11
            SMP: Pairing Response (0x02) len 6
              IO capability: NoInputNoOutput (0x03)
              OOB data: Authentication data not present (0x00)
              Authentication requirement: Bonding, No MITM, SC, No Keypresses (0x09)
              Max encryption key size: 16
              Initiator key distribution: EncKey (0x01)
              Responder key distribution: EncKey Sign (0x05)
      
      The pairing eventually fails when we get an unexpected Pairing Confirm
      PDU instead of a Public Key PDU:
      
      > ACL Data RX: Handle 3585 flags 0x02 dlen 21
            SMP: Pairing Confirm (0x03) len 16
              Confim value: bcc3bed31b8f313a78ec3cce32685faf
      
      It is only at this point that we can speculate that the remote doesn't
      really support SC. This patch creates a workaround for the just-works
      model, however the MITM case is unsolvable because the OS X user has
      already been requested to enter a PIN which we're now expected to
      randomly generate and show the user (i.e. a chicken-and-egg problem).
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      19c5ce9c
    • Johan Hedberg's avatar
      Bluetooth: Move generic mgmt command dispatcher to hci_sock.c · fa4335d7
      Johan Hedberg authored
      The mgmt.c file should be reserved purely for HCI_CHANNEL_CONTROL. The
      mgmt_control() function in it is already completely generic and has a
      single user in hci_sock.c. This patch moves the function there and
      renames it a bit more appropriately to hci_mgmt_cmd() (as it's a command
      dispatcher).
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      fa4335d7
    • Johan Hedberg's avatar
      Bluetooth: Add hdev_init callback for HCI channels · 88b94ce9
      Johan Hedberg authored
      In order to make the mgmt command handling more generic we can't have a
      direct call to mgmt_init_hdev() from mgmt_control(). This patch adds a
      new callback to struct hci_mgmt_chan. And sets it to point to the
      mgmt_init_hdev() function for the HCI_CHANNEL_CONTROL instance.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      88b94ce9
    • Johan Hedberg's avatar
      Bluetooth: Add generic mgmt helper API · a380b6cf
      Johan Hedberg authored
      There are several mgmt protocol features that will be needed by more
      than just the current HCI_CHANNEL_CONTROL. These include sending generic
      events as well as handling pending commands. This patch moves these
      functions out from mgmt.c to a new mgmt_util.c file.
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      a380b6cf