Skip to content
  • Johan Hedberg's avatar
    Bluetooth: Re-encrypt link after receiving an LTK · 38ccdc93
    Johan Hedberg authored
    
    
    It's not strictly speaking required to re-encrypt a link once we receive
    an LTK since the connection is already encrypted with the STK. However,
    re-encrypting with the LTK allows us to verify that we've received an
    LTK that actually works.
    
    This patch updates the SMP code to request encrypting with the LTK in
    case we're in master role and waits until the key refresh complete event
    before notifying user space of the distributed keys.
    
    A new flag is also added for the SMP context to ensure that we
    re-encryption only once in case of multiple calls to smp_distribute_keys.
    
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    38ccdc93